chore!: separated galaxy deps and own collections; modified ansible script generation to use two paths for collections
REQUIRES REGENERATING ansible.cfg!
This commit is contained in:
parent
4af69c31ce
commit
888590ed9f
188 changed files with 30 additions and 30 deletions
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
- name: '[home] get user account information'
|
||||
ansible.builtin.getent:
|
||||
database: passwd
|
||||
key: "{{ common_user_account }}"
|
||||
split: ":"
|
||||
changed_when: false
|
||||
when: ansible_facts['getent_passwd'] is undefined or common_user_account not in ansible_facts['getent_passwd']
|
||||
|
||||
- name: '[home] create common directories'
|
||||
become: true
|
||||
become_user: "{{ common_user_account }}"
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_facts['getent_passwd'][common_user_account][4] }}/{{ item }}"
|
||||
state: directory
|
||||
mode: '0750'
|
||||
loop:
|
||||
- .local/bin
|
||||
- .local/share/fonts
|
||||
- .config
|
||||
- .ssh
|
||||
|
||||
- name: '[home] setup home files'
|
||||
become: true
|
||||
become_user: "{{ common_user_account }}"
|
||||
block:
|
||||
- name: '[home] git configuration'
|
||||
ansible.builtin.template:
|
||||
src: ../templates/home/.gitconfig.j2
|
||||
dest: "{{ ansible_facts['getent_passwd'][common_user_account][4] }}/.gitconfig"
|
||||
mode: '0640'
|
||||
when: common_git_enabled is truthy
|
||||
|
||||
- name: '[home] basic files'
|
||||
ansible.builtin.copy:
|
||||
src: "../templates/home/{{ item.name }}"
|
||||
dest: "{{ ansible_facts['getent_passwd'][common_user_account][4] }}/{{ item.name }}"
|
||||
mode: "{{ item.mode | default('0640') }}"
|
||||
loop:
|
||||
- { name: ".lessfilter", mode: '0750' }
|
||||
- { name: ".pythonrc" }
|
Loading…
Add table
Add a link
Reference in a new issue