Aggiunta become su alcuni task da fare con utente specifico.
This commit is contained in:
parent
e09d5060e0
commit
4bd402b827
@ -9,6 +9,7 @@
|
|||||||
name: "{{ additional_user }}"
|
name: "{{ additional_user }}"
|
||||||
shell: /usr/bin/zsh
|
shell: /usr/bin/zsh
|
||||||
become_user: root
|
become_user: root
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Creating personal folder for customization
|
- name: Creating personal folder for customization
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -16,12 +17,14 @@
|
|||||||
state: directory
|
state: directory
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
become_user: "{{ additional_user }}"
|
become_user: "{{ additional_user }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Removing previous file if present
|
- name: Removing previous file if present
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc"
|
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc"
|
||||||
state: absent
|
state: absent
|
||||||
become_user: "{{ additional_user }}"
|
become_user: "{{ additional_user }}"
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Linking main file
|
- name: Linking main file
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@ -30,3 +33,4 @@
|
|||||||
state: link
|
state: link
|
||||||
force: true
|
force: true
|
||||||
become_user: "{{ additional_user }}"
|
become_user: "{{ additional_user }}"
|
||||||
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user