Add the base zsh config.
This commit is contained in:
33
ansible/roles/per_user/tasks/main.yaml
Normal file
33
ansible/roles/per_user/tasks/main.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
- name: account $HOME
|
||||
shell: "echo $HOME"
|
||||
register: account_homedir
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
- name: account name
|
||||
command: id -un
|
||||
register: account_name
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
- name: group name
|
||||
command: id -gn
|
||||
register: group_name
|
||||
changed_when: false
|
||||
check_mode: no
|
||||
|
||||
- name: Create directories
|
||||
file:
|
||||
name: "{{ account_homedir.stdout }}/{{ item }}"
|
||||
state: directory
|
||||
mode: 0700
|
||||
owner: "{{ account_name.stdout }}"
|
||||
group: "{{ group_name.stdout }}"
|
||||
loop:
|
||||
- .ansible_deploy
|
||||
|
||||
- import_tasks: tasks/peruser_freebsd.yaml
|
||||
when: 'os_flavor == "freebsd"'
|
||||
|
||||
- import_tasks: tasks/peruser_linux.yaml
|
||||
when: 'os_flavor == "linux"'
|
||||
Reference in New Issue
Block a user