--- # tasks file for update - name: include assert.yml import_tasks: assert.yml run_once: yes delegate_to: localhost - name: configure apk block: - name: update cache (apk) community.general.apk: update_cache: yes changed_when: no - name: update all software (apk) community.general.apk: upgrade: yes notify: - reboot when: - ansible_pkg_mgr == "apk" - name: configure apt block: - name: update all software (apt) ansible.builtin.apt: update_cache: yes upgrade: "{{ update_upgrade_command }}" cache_valid_time: "{{ update_cache_valid_time }}" notify: - reboot - name: apt autoremove (apt) ansible.builtin.apt: autoremove: "{{ update_autoremove }}" when: - ansible_pkg_mgr == "apt" - update_autoremove == "yes" tags: - skip_ansible_lint when: - ansible_pkg_mgr == "apt" - name: update all software (dnf) ansible.builtin.dnf: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "dnf" tags: - skip_ansible_lint - name: update all software (pacman) community.general.pacman: update_cache: yes upgrade: yes notify: - reboot when: - ansible_pkg_mgr == "pacman" tags: - skip_ansible_lint - name: configure yum block: - name: update all software (yum/6) ansible.builtin.yum: name: "*" state: latest notify: - reboot when: - ansible_distribution_major_version == "6" tags: - skip_ansible_lint - name: configure 7 block: - name: update all software (yum/7) ansible.builtin.yum: name: "*" state: latest notify: - reboot tags: - skip_ansible_lint - name: install yum-utils ansible.builtin.package: name: yum-utils when: - ansible_distribution_major_version == "7" when: - ansible_pkg_mgr == "yum" - name: update all software (zypper) community.general.zypper: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "zypper" tags: - skip_ansible_lint