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
This commit is contained in:
Major Hayden 2018-02-06 12:39:10 -06:00
parent 0635fb840a
commit 295ef13395
No known key found for this signature in database
GPG Key ID: 737051E0C1011FB1
1 changed files with 1 additions and 1 deletions

View File

@ -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