-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin-auditor.yml
42 lines (42 loc) · 1.23 KB
/
admin-auditor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
- hosts: "overcloud-controller*"
vars_files:
- vars/admin-auditor.yml
vars:
auditor_bin_location: "/usr/bin/admin-auditor.py"
auditor_log_location: "/var/log/admin-auditor.log"
# Make sure you manage your auditor admin user and
# get the proper variables into here.
auditor_rc_location: "/root/auditorrc"
no_proxy_contents: ""
auth_url_contents: "https://127.0.0.1:13000//v3"
password_contents: ""
username_contents: "admin-auditor"
roles:
tasks:
- name: Install python command
copy:
src: files/admin-auditor.py
dest: "{{ auditor_bin_location }}"
mode: '0755'
owner: root
group: root
force: yes
- name: Setup crontab
cron:
name: "admin action auditor"
minute: 0
hour: 7
job: "source {{ auditor_rc_location }} && find /var/log/containers -name \"*log\" | xargs {{ auditor_bin_location }} > {{ auditor_log_location }}"
- name: Setup logfile
file:
path: "{{ auditor_log_location }}"
state: touch
mode: '0644'
- name: Ensure auditorrc
template:
src: files/auditorrc.j2
dest: /root/auditorrc
mode: '0640'
owner: root
group: root