0

Installing AIDE needs to follow by a init proces.

aide:
pkg:
- installed

Now the following commands need to run only once:
/usr/sbin/aide --config=/etc/aide.conf --init
mv -f /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz


How to manage this in a state file?

1

I usually do something like this:

run aide once after installation:
  cmd.run:
    - name: usr/sbin/aide --config=/etc/aide.conf --init mv -f /var/lib/aide/aide.db.new.gz /var/lib/aide/aide.db.gz
    - unless: test -e /var/lib/aide/aide.db.gz
    - require: aide

Untested, obviously, but you get the idea. The cmd.run state will only run if the command passed to the unless option returns a non-zero exit status.

cmd.run state documemtation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.