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 d735112b531b17db8e58a6020b592dcb46474f75..e3267775f64d8aa0274e38271884ec335c760689 100644 (file)
@@ -1,5 +1,6 @@
 [defaults]
 inventory = hosts
 [defaults]
 inventory = hosts
+stdout_callback = debug
 
 [privilege_escalation]
 become = True
 
 [privilege_escalation]
 become = True
index 31f6619df20dce2f29ccf122a902a7d92871341b..d739e20e80b30b3cd6c174a70e2b617ffa5d71b8 100644 (file)
@@ -1,10 +1,13 @@
 - hosts: all
 - hosts: all
+  gather_facts: no
   tasks:
   tasks:
+  - name: autoremove
+    apt: autoremove=yes
+  - name: autoclean
+    apt: autoclean=yes
   - name: system upgrade
   - name: system upgrade
-    apt:
-      autoremove: yes
-      autoclean: yes
-      update_cache: yes
-      upgrade: dist
+    apt: update_cache=yes upgrade=dist
     environment:
       NEEDRESTART_MODE: automatically
     environment:
       NEEDRESTART_MODE: automatically
+    register: upgrade
+  - debug: msg={{ upgrade.msg }}