From: Ralf Jung Date: Sun, 8 Apr 2018 08:22:34 +0000 (+0200) Subject: tweak upgrade playbook X-Git-Url: https://git.ralfj.de/ansible.git/commitdiff_plain/cc441ad57552faa990c070a6f9e9ce59294f9939 tweak upgrade playbook --- diff --git a/ansible.cfg b/ansible.cfg index d735112..e326777 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,6 @@ [defaults] inventory = hosts +stdout_callback = debug [privilege_escalation] become = True diff --git a/upgrade.yml b/upgrade.yml index 31f6619..d739e20 100644 --- a/upgrade.yml +++ b/upgrade.yml @@ -1,10 +1,13 @@ - hosts: all + gather_facts: no tasks: + - name: autoremove + apt: autoremove=yes + - name: autoclean + apt: autoclean=yes - name: system upgrade - apt: - autoremove: yes - autoclean: yes - update_cache: yes - upgrade: dist + apt: update_cache=yes upgrade=dist environment: NEEDRESTART_MODE: automatically + register: upgrade + - debug: msg={{ upgrade.msg }}