2024-04-06 19:42:57 +02:00
|
|
|
---
|
|
|
|
- name: Create vimrc configuration for root
|
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: 'templates/vimrc.j2'
|
|
|
|
dest: '/root/.vimrc'
|
|
|
|
owner: 'root'
|
|
|
|
group: 'root'
|
|
|
|
mode: 'u=rw,g=r,o=r'
|
|
|
|
|
2024-04-06 20:08:55 +02:00
|
|
|
- name: Create vimrc configuration per defined user
|
2024-04-06 19:42:57 +02:00
|
|
|
become: true
|
|
|
|
ansible.builtin.template:
|
2024-04-06 20:08:55 +02:00
|
|
|
src: 'templates/vimrc.j2'
|
|
|
|
dest: "{{ user.home | default('/home/' + user.name) }}/.vimrc"
|
2024-04-06 19:42:57 +02:00
|
|
|
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'
|