generated from sebclem/ansible-role-template
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
|
---
|
||
|
- name: set default shell for users
|
||
|
become: yes
|
||
|
user:
|
||
|
name: "{{ user.username }}"
|
||
|
shell: /bin/zsh
|
||
|
when: user.antidote_plugins is defined
|
||
|
loop: "{{ 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: "{{ 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: "{{ 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"
|
||
|
create: yes
|
||
|
mode: "u=rw,go=r"
|
||
|
when: user.antidote_plugins is defined
|
||
|
loop: "{{ 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'
|