source: main/waeup-ansible/playbook-daily-upgrade.yml @ 15694

Last change on this file since 15694 was 15572, checked in by uli, 5 years ago

Go on when something goes wrong.

Do not skip further hosts if things go wrong on another host.

File size: 681 bytes
RevLine 
[14985]1# Run 'aptitude safe-upgrade' on all registered hosts.
2#
3# The output of each update is appended to `myfineupdate.log`, a locally
4# created file.
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
[15572]15    ignore_errors: true
[14985]16    register: upgrade
[14982]17    apt:
18        update_cache: yes
19        upgrade: safe
[14985]20  - name: "log-to myfineupdate.log"
[15003]21    local_action: shell echo "{{ inventory_hostname }}:"" ----- `date --rfc-3339=seconds`\n  {{ '\n  '.join(upgrade.stdout_lines) }}  {{ '\n  '.join(upgrade.stderr_lines) }}" >> "myfineupdate.log"
[14985]22    become: false
23    changed_when: false
Note: See TracBrowser for help on using the repository browser.