feat: remove become from role
All checks were successful
test / Linting (push) Successful in 23s
test / Molecule tests (default, debian12) (push) Successful in 2m4s
test / Molecule tests (default, ubuntu2204) (push) Successful in 2m33s
test / Molecule tests (with_custom_packages, ubuntu2204) (push) Successful in 1m54s
test / Molecule tests (with_custom_packages, debian12) (push) Successful in 4m59s

This commit is contained in:
Bertrand Lanson 2023-12-03 17:52:13 +01:00
parent bb20de532f
commit f189113ebf
9 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,7 @@
--- ---
- name: Converge - name: Converge
hosts: all hosts: all
become: true
tasks: tasks:
- name: "Include ednxzu.manage_pipx_packages" - name: "Include ednxzu.manage_pipx_packages"
ansible.builtin.include_role: ansible.builtin.include_role:

View File

@ -1,7 +1,8 @@
--- ---
- name: Verify - name: Verify
hosts: all hosts: all
gather_facts: false gather_facts: true
become: true
tasks: tasks:
- name: "Test: file /etc/hosts" - name: "Test: file /etc/hosts"
block: block:
@ -26,7 +27,6 @@
PIPX_HOME: "/opt/pipx" PIPX_HOME: "/opt/pipx"
changed_when: false changed_when: false
register: pipx_installed_packages register: pipx_installed_packages
become: true
- name: "Set fact" - name: "Set fact"
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@ -1,6 +1,7 @@
--- ---
- name: Converge - name: Converge
hosts: all hosts: all
become: true
tasks: tasks:
- name: "Include ednxzu.manage_pipx_packages" - name: "Include ednxzu.manage_pipx_packages"
ansible.builtin.include_role: ansible.builtin.include_role:

View File

@ -2,6 +2,7 @@
- name: Verify - name: Verify
hosts: all hosts: all
gather_facts: true gather_facts: true
become: true
tasks: tasks:
- name: "Test: file /etc/hosts" - name: "Test: file /etc/hosts"
block: block:
@ -30,7 +31,6 @@
PIPX_HOME: "/opt/pipx" PIPX_HOME: "/opt/pipx"
changed_when: false changed_when: false
register: pipx_installed_packages register: pipx_installed_packages
become: true
- name: "Set fact" - name: "Set fact"
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@ -1,6 +1,7 @@
--- ---
- name: Converge - name: Converge
hosts: all hosts: all
become: true
tasks: tasks:
- name: "Include ednxzu.manage_pipx_packages" - name: "Include ednxzu.manage_pipx_packages"
ansible.builtin.include_role: ansible.builtin.include_role:

View File

@ -1,7 +1,8 @@
--- ---
- name: Verify - name: Verify
hosts: all hosts: all
gather_facts: false gather_facts: true
become: true
tasks: tasks:
- name: "Test: file /etc/hosts" - name: "Test: file /etc/hosts"
block: block:
@ -26,7 +27,6 @@
PIPX_HOME: "/opt/pipx" PIPX_HOME: "/opt/pipx"
changed_when: false changed_when: false
register: pipx_installed_packages register: pipx_installed_packages
become: true
- name: "Set fact" - name: "Set fact"
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@ -1,6 +1,7 @@
--- ---
- name: Converge - name: Converge
hosts: all hosts: all
become: true
tasks: tasks:
- name: "Include ednxzu.manage_pipx_packages" - name: "Include ednxzu.manage_pipx_packages"
ansible.builtin.include_role: ansible.builtin.include_role:

View File

@ -2,6 +2,7 @@
- name: Verify - name: Verify
hosts: all hosts: all
gather_facts: true gather_facts: true
become: true
tasks: tasks:
- name: "Test: file /etc/hosts" - name: "Test: file /etc/hosts"
block: block:
@ -30,7 +31,6 @@
PIPX_HOME: "/opt/pipx" PIPX_HOME: "/opt/pipx"
changed_when: false changed_when: false
register: pipx_installed_packages register: pipx_installed_packages
become: true
- name: "Set fact" - name: "Set fact"
ansible.builtin.set_fact: ansible.builtin.set_fact:

View File

@ -14,4 +14,3 @@
loop: "{{ manage_pipx_packages_list }}" loop: "{{ manage_pipx_packages_list }}"
when: manage_pipx_packages_list is defined when: manage_pipx_packages_list is defined
and manage_pipx_packages_list not in [None, ''] and manage_pipx_packages_list not in [None, '']
become: true