generated from sebclem/ansible-role-template
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
---
|
|
- name: set default shell for users
|
|
become: yes
|
|
user:
|
|
name: "{{ user.username }}"
|
|
shell: /bin/zsh
|
|
when: user.antidote_plugins is defined
|
|
loop: "{{ antidote_users }}"
|
|
loop_control:
|
|
loop_var: user
|
|
label: "{{ user.username }}"
|
|
|
|
- name: write .antidoterc for users
|
|
become: yes
|
|
become_user: "{{ user.username }}"
|
|
template:
|
|
src: antidoterc.j2
|
|
dest: "~{{ user.username }}/.antidoterc"
|
|
mode: "u=rw,go=r"
|
|
when: user.antidote_plugins is defined
|
|
loop: "{{ antidote_users }}"
|
|
loop_control:
|
|
loop_var: user
|
|
label: "{{ user.username }}"
|
|
|
|
- name: write .zsh_plugins.txt for users
|
|
become: yes
|
|
become_user: "{{ user.username }}"
|
|
template:
|
|
src: zsh_plugins.txt.j2
|
|
dest: "~{{ user.username }}/.zsh_plugins.txt"
|
|
mode: "u=rw,go=r"
|
|
when: user.antidote_plugins is defined
|
|
loop: "{{ antidote_users }}"
|
|
loop_control:
|
|
loop_var: user
|
|
label: "{{ user.username }}"
|
|
|
|
- name: add .antidoterc to .zshrc
|
|
become: yes
|
|
become_user: "{{ user.username }}"
|
|
lineinfile:
|
|
path: "~/.zshrc"
|
|
line: "source ~/.antidoterc"
|
|
insertbefore: "source ~/.ansible_zshrc"
|
|
create: yes
|
|
mode: "u=rw,go=r"
|
|
when: user.antidote_plugins is defined
|
|
loop: "{{ antidote_users }}"
|
|
loop_control:
|
|
loop_var: user
|
|
label: "{{ user.username }}"
|
|
# - name: configure console for Debian family distributions
|
|
# include_tasks: configure-debian-console.yml
|
|
# when: ansible_os_family == 'Debian'
|