959f0301e7
This adds a periodic job to copy logs to a mirror volume, and export it via the usual mirror http. I have precreated the log volume; just as a R/W volume because this is expected to be very low volume access. Change-Id: I67870f6d439af2d2a63a5048ef52cecff3e75275
33 lines
786 B
YAML
33 lines
786 B
YAML
- name: Install log publisher keytab
|
|
shell: 'echo "{{ mirror_update_keytab_logs }}" | base64 -d > /etc/logs.keytab'
|
|
args:
|
|
creates: /etc/logs.keytab
|
|
no_log: True
|
|
|
|
- name: Ensure permissions on log publisher keytab
|
|
file:
|
|
path: '/etc/logs.keytab'
|
|
owner: root
|
|
group: root
|
|
mode: '0400'
|
|
|
|
- name: Copy log publisher script
|
|
copy:
|
|
src: 'publish-mirror-logs'
|
|
dest: '/usr/local/bin/publish-mirror-logs'
|
|
mode: '0755'
|
|
|
|
- name: Install log publisher cron job
|
|
cron:
|
|
name: 'Publish mirror logs'
|
|
state: present
|
|
job: 'publish-mirror-logs >> /var/log/publish-mirror-logs.log 2>&1'
|
|
hour: '*'
|
|
minute: '30'
|
|
|
|
- name: Install logrotate rules
|
|
include_role:
|
|
name: logrotate
|
|
vars:
|
|
logrotate_file_name: '/var/log/publish-mirror-logs.log'
|