ansible/roles/shell/tasks/main.yml
Sivert V. Sæther a70d58f3f7 Ansible god!
Big rework!
Control stuffs with variables!
We still should do some movei'n around of roles before extending
features.
2022-03-23 02:03:04 +01:00

31 lines
903 B
YAML

- name: Setup user zsh config
when: "'zsh' in setup"
tags: [user,zsh]
block:
- name: Add .zshrc
template: src=zshrc.zsh.j2 dest=/home/{{ name }}/.zshrc owner={{ name }} group={{ group }} mode=0644
- name: Add zsh zstyles config
copy: src=zstyles.zsh dest=/home/{{ name }}/.zstyles owner={{ name }} group={{ group }} mode=0644
- name: Setup user bash config
when: "'bash' in setup"
tags: [user,bash]
block:
- name: Add .bashrc
template: src=bashrc.sh.j2 dest=/home/{{ name }}/.bashrc owner={{ name }} group={{ group }} mode=0644
- name: Setup user extra config
when: "'extra' in setup"
tags: [user,extra]
block:
- import_tasks: extra.yml
- name: Add .env file
when: not revert
copy: src=env.sh dest=/home/{{ name }}/.env owner={{ name }} group={{ group }} mode=0644
- name: Revert ansible shell setup
when: revert
block:
- import_tasks: revert.yml