Fix auditd restart handler

It is not possible to restart auditd with systemctl. Using the service
interface is required. There are chef cookbooks[1] with the same
workaround.

This patch also includes a `cache_valid_time` addition to test.yml to
unblock the gate.

[1] https://github.com/chef-cookbooks/auditd/pull/22/files

Closes-Bug: #1662622
Change-Id: I1aa3faf88f5953c230693600fcbcb786d49a35e0
(cherry picked from commit 23af709fff)
This commit is contained in:
Major Hayden 2016-11-07 10:43:39 -06:00 committed by David Rabel
parent 83e3c206e8
commit 2a2b1e619f
2 changed files with 7 additions and 3 deletions

View File

@ -14,10 +14,13 @@
# limitations under the License.
# Restarting services ########################################################
#
# NOTE(mhayden): It's not possible to use systemd to restart auditd on CentOS
# since it's a special service. Using the old service scripts is required.
- name: restart auditd
service:
name: auditd
state: restarted
command: service auditd restart
args:
warn: no
- name: restart chrony
service:

View File

@ -19,6 +19,7 @@
- name: Ensure apt cache is updated before testing
apt:
update_cache: yes
cache_valid_time: "{{ cache_timeout }}"
when: ansible_pkg_mgr == 'apt'
changed_when: False
- name: Ensure OpenStack CI image has a logrotate cron job