From bb9472399dfcd33f6b768c4777bb0df67b9b7464 Mon Sep 17 00:00:00 2001 From: Danny de Kooker Date: Thu, 6 Jun 2024 18:01:51 +0200 Subject: [PATCH] added become-method --- Update/upd-apt.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Update/upd-apt.yaml b/Update/upd-apt.yaml index 58ecaed..8a4a25a 100644 --- a/Update/upd-apt.yaml +++ b/Update/upd-apt.yaml @@ -7,18 +7,21 @@ - name: Update packages with apt when: ansible_pkg_mgr == 'apt' become: true + become_method: sudo ansible.builtin.apt: update_cache: true - name: Upgrade packages with apt when: ansible_pkg_mgr == 'apt' become: true + become_method: sudo ansible.builtin.apt: upgrade: dist - name: Update packages with yum when: ansible_pkg_mgr == 'yum' become: true + become_method: sudo ansible.builtin.yum: name: '*' state: latest # noqa: package-latest @@ -26,6 +29,7 @@ - name: Upgrade packages with yum when: ansible_pkg_mgr == 'yum' become: true + become_method: sudo ansible.builtin.yum: name: '*' state: latest # noqa: package-latest