mirror of
https://github.com/roles-ansible/ansible_collection_users.git
synced 2024-08-16 10:29:50 +02:00
24 lines
654 B
YAML
24 lines
654 B
YAML
|
---
|
||
|
- name: Create tmux configuration for root
|
||
|
become: true
|
||
|
ansible.builtin.template:
|
||
|
src: 'templates/tmux.conf.j2'
|
||
|
dest: '/root/.tmux.conf'
|
||
|
owner: 'root'
|
||
|
group: 'root'
|
||
|
mode: 'u=rw,g=r,o=r'
|
||
|
|
||
|
- name: Create vimrc configuration per defined user
|
||
|
become: true
|
||
|
ansible.builtin.template:
|
||
|
src: 'templates/tmux.conf.j2'
|
||
|
dest: "{{ user.home | default('/home/' + user.name) }}/.tmux.conf"
|
||
|
owner: "{{ user.name }}"
|
||
|
group: "{{ user.name }}"
|
||
|
mode: '0640'
|
||
|
loop: "{{ _l3d_users__merged_users }}"
|
||
|
loop_control:
|
||
|
label: "user={{ user.name }}"
|
||
|
loop_var: user
|
||
|
when: user.state | default ('present') == 'present'
|