From cee2e0b5b432c50614b908d9bf50ed2cc32d8daa Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 6 Feb 2018 12:39:10 -0600 Subject: [PATCH] Move aide db when needed The task that moves the aide database checks to see whether aide was just initialized, but that task has a "changed_when: false" to help with idempotency. That means that the database never gets moved into place. This patch changes the task to check whether the aide initialization was skipped or not. If it wasn't skipped, then the database will be moved. Closes-Bug: 1745675 Change-Id: I2f186274cbff4b38706603a51429557057843e4e (cherry picked from commit 295ef13395a2edf1922b0d5a31f224fdf4b0b525) --- tasks/rhel7stig/aide.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/rhel7stig/aide.yml b/tasks/rhel7stig/aide.yml index ba0b9ba7..e4c562f4 100644 --- a/tasks/rhel7stig/aide.yml +++ b/tasks/rhel7stig/aide.yml @@ -115,7 +115,7 @@ command: "mv {{ aide_database_out_file }} {{ aide_database_file }}" changed_when: false when: - - aide_init | changed + - not aide_init | skipped - ansible_pkg_mgr in ['yum', 'zypper'] tags: - medium