source:
main/waeup-ansible/playbook-daily-upgrade.yml
@
17949
Last change on this file since 17949 was 16460, checked in by , 4 years ago | |
---|---|
File size: 472 bytes |
Rev | Line | |
---|---|---|
[16460] | 1 | # Daily package maintenance |
[14985] | 2 | # |
[16460] | 3 | # Run 'aptitude safe-upgrade' on all registered hosts followed by |
4 | # apt-autoremove | |
[14985] | 5 | # |
6 | # Run like: | |
7 | # | |
8 | # $ ansible-playbook -i hosts playbook-daily-upgrade.yml | |
9 | # | |
[14982] | 10 | - hosts: all |
11 | become: true | |
12 | become_user: root | |
13 | tasks: | |
14 | - name: safe-upgrade | |
[16460] | 15 | # ignore_errors: true |
[14985] | 16 | register: upgrade |
[14982] | 17 | apt: |
18 | update_cache: yes | |
19 | upgrade: safe | |
[16460] | 20 | - name: autoremove-old-pkgs |
21 | apt: | |
22 | autoremove: yes | |
23 | when: | |
24 | upgrade.changed |
Note: See TracBrowser for help on using the repository browser.