
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
37 lines
999 B
YAML
37 lines
999 B
YAML
# NOTE(ianw) : this does not feel like a a great way to write out
|
|
# binary data. But you can't do what you'd logically think at first
|
|
# with like
|
|
#
|
|
# copy:
|
|
# content: {{ string | b64decode }}
|
|
#
|
|
# because jinja treats the content as utf-8, and ends up mangling
|
|
# "real" binary data like a keytab. See issues like:
|
|
# https://github.com/ansible/ansible/issues/20150
|
|
- name: Install afsadmin keytab
|
|
shell: 'echo "{{ mirror_update_keytab_afsadmin }}" | base64 -d > /etc/afsadmin.keytab'
|
|
args:
|
|
creates: /etc/afsadmin.keytab
|
|
no_log: True
|
|
|
|
- name: Ensure permissions on afsadmin keytab
|
|
file:
|
|
path: '/etc/afsadmin.keytab'
|
|
owner: root
|
|
group: root
|
|
mode: '0400'
|
|
|
|
- name: Set PATH for cron
|
|
cron:
|
|
name: PATH
|
|
env: yes
|
|
value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
- name: Setup log publisher script
|
|
include_tasks: log_publish.yaml
|
|
|
|
- name: Setup rsync mirror scripts
|
|
include_tasks: rsync.yaml
|
|
|
|
# TODO: reprepro and other mirror components
|