[jenkins-ci PATCH 5/3] guests: Add support for removing packages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 guests/tasks/packages.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/guests/tasks/packages.yml b/guests/tasks/packages.yml
index 807b5c4..a26a94d 100644
--- a/guests/tasks/packages.yml
+++ b/guests/tasks/packages.yml
@@ -1,4 +1,10 @@
 ---
+# Default to installing packages if state is not passed from the caller
+- set_fact:
+    state: present
+  when:
+    - state is undefined
+
 - name: '{{ project }}: Load variables'
   include_vars:
     file: 'vars/projects/{{ project }}.yml'
@@ -58,9 +64,9 @@
     - temp[item] != None
     - temp[item] not in flattened
 
-- name: '{{ project }}: Install packages'
+- name: '{{ project }}: Install/remove packages (state={{ state }})'
   package:
     name: '{{ item }}'
-    state: present
+    state: '{{ state }}'
   with_items:
     '{{ flattened|sort }}'
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux