Aggiunta become su alcuni task da fare con utente specifico.

This commit is contained in:
Emiliano Vavassori 2024-12-23 23:51:33 +01:00
parent e09d5060e0
commit 4bd402b827

View File

@ -9,6 +9,7 @@
name: "{{ additional_user }}"
shell: /usr/bin/zsh
become_user: root
become: true
- name: Creating personal folder for customization
ansible.builtin.file:
@ -16,12 +17,14 @@
state: directory
mode: '0755'
become_user: "{{ additional_user }}"
become: true
- name: Removing previous file if present
ansible.builtin.file:
path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc"
state: absent
become_user: "{{ additional_user }}"
become: true
- name: Linking main file
ansible.builtin.file:
@ -30,3 +33,4 @@
state: link
force: true
become_user: "{{ additional_user }}"
become: true