Markus Pesch
b48e2a37c6
All checks were successful
continuous-integration/drone/push Build is passing
29 lines
777 B
YAML
29 lines
777 B
YAML
---
|
|
|
|
- name: "Determine entries via NSS for unix user: {{ item.key }}"
|
|
ansible.builtin.getent:
|
|
database: passwd
|
|
key: "{{ item.key }}"
|
|
|
|
- name: "Create git config directory for unix user: {{ item.key }}"
|
|
ansible.builtin.file:
|
|
dest: "{{ getent_passwd[item.key][4] }}/.config/git"
|
|
owner: "{{ item.key }}"
|
|
group: "{{ getent_passwd[item.key][2] }}"
|
|
state: directory
|
|
mode: "0755"
|
|
|
|
- name: Create global git config files
|
|
ansible.builtin.template:
|
|
src: "{{ filename }}.j2"
|
|
dest: "{{ getent_passwd[item.key][4] }}/{{ filename }}"
|
|
owner: "{{ item.key }}"
|
|
group: "{{ getent_passwd[item.key][2] }}"
|
|
mode: "0644"
|
|
with_items:
|
|
- .config/git/config
|
|
- .config/git/message
|
|
- .config/git/ignore
|
|
loop_control:
|
|
loop_var: filename
|