fix update_cache (#632)

Reviewed-on: #632
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2023-12-19 11:11:38 +01:00 committed by mg
parent 33faf8b188
commit d6bb2cfae4
3 changed files with 9 additions and 12 deletions

View file

@ -19,3 +19,8 @@
- name: reboot - name: reboot
ansible.builtin.reboot: ansible.builtin.reboot:
when: (upgrade.changed and (inventory_hostname != 'pve5.mgrote.net' and inventory_hostname != 'ansible2.mgrote.net')) when: (upgrade.changed and (inventory_hostname != 'pve5.mgrote.net' and inventory_hostname != 'ansible2.mgrote.net'))
- name: Info
ansible.builtin.debug:
msg: Pool auf pbs.mgrote.net mounten!
when: (upgrade.changed and inventory_hostname = 'pbs.mgrote.net')

View file

@ -1,10 +1,6 @@
--- ---
- name: update apt cache - name: update apt cache and installed packages
become: true
ansible.builtin.apt:
update_cache: true
- name: update installed packages
become: true become: true
ansible.builtin.package: ansible.builtin.package:
upgrade: dist upgrade: dist
update_cache: true

View file

@ -1,12 +1,8 @@
--- ---
- name: update apt cache - name: update apt cache and ensure packages are installed
become: true
ansible.builtin.apt:
update_cache: true
- name: install packages
become: true become: true
ansible.builtin.package: ansible.builtin.package:
update_cache: true
name: qemu-guest-agent name: qemu-guest-agent
state: present state: present
when: ansible_virtualization_role == 'guest' when: ansible_virtualization_role == 'guest'