Add auditd upgrate steps
authorCarlos Camacho <ccamacho@redhat.com>
Sun, 26 Feb 2017 20:36:39 +0000 (21:36 +0100)
committerCarlos Camacho <ccamacho@redhat.com>
Tue, 28 Feb 2017 16:25:51 +0000 (16:25 +0000)
Add base upgrade steps for auditd

Change-Id: Iaa56eb40ed80d20744cf8bab18504d700466d26e
(cherry picked from commit 5838d6f765a1ca9535b5d57c1299439040a5def2)

puppet/services/auditd.yaml

index 639631e..a0535ae 100644 (file)
@@ -32,3 +32,18 @@ outputs:
         auditd::rules: {get_param: AuditdRules}
       step_config: |
         include ::tripleo::profile::base::auditd
+      upgrade_tasks:
+        - name: Check if auditd is deployed
+          command: systemctl is-enabled auditd
+          tags: step0,validation
+          ignore_errors: True
+          register: auditd_enabled
+        - name: "PreUpgrade step0,validation: Check if auditd is running"
+          shell: >
+            /usr/bin/systemctl show 'auditd' --property ActiveState |
+            grep '\bactive\b'
+          when: auditd_enabled.rc == 0
+          tags: step0,validation
+        - name: Stop auditd service
+          tags: step2
+          service: name=auditd state=stopped