tweak upgrade playbook
authorRalf Jung <post@ralfj.de>
Sun, 8 Apr 2018 08:22:34 +0000 (10:22 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 8 Apr 2018 08:22:34 +0000 (10:22 +0200)
ansible.cfg
upgrade.yml

index d735112..e326777 100644 (file)
@@ -1,5 +1,6 @@
 [defaults]
 inventory = hosts
+stdout_callback = debug
 
 [privilege_escalation]
 become = True
index 31f6619..d739e20 100644 (file)
@@ -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 }}