1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
--- # tasks file for update - name: include assert.yml include_tasks: assert.yml - name: update cache (apk) apk: update_cache: yes when: - ansible_pkg_mgr == "apk" changed_when: no - name: update all software (apk) apk: upgrade: yes notify: - reboot when: - ansible_pkg_mgr == "apk" - name: update all software (apt) apt: update_cache: yes upgrade: "{{ update_upgrade_command }}" cache_valid_time: "{{ update_cache_valid_time }}" notify: - reboot when: - ansible_pkg_mgr == "apt" - name: apt autoremove (apt) apt: autoremove: "{{ update_autoremove }}" when: - ansible_pkg_mgr == "apt" - update_autoremove == "yes" tags: - skip_ansible_lint - name: update all software (dnf) dnf: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "dnf" tags: - skip_ansible_lint - name: update all software (pacman) pacman: update_cache: yes upgrade: yes notify: - reboot when: - ansible_pkg_mgr == "pacman" tags: - skip_ansible_lint - name: update all software (yum/6) yum: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "6" tags: - skip_ansible_lint - name: update all software (yum/7) yum: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "7" tags: - skip_ansible_lint - name: install yum-utils package: name: yum-utils when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "7" - name: update all software (zypper) zypper: name: "*" state: latest notify: - reboot when: - ansible_pkg_mgr == "zypper" tags: - skip_ansible_lint