system-config/playbooks/roles/mirror-update/tasks/main.yaml
Ian Wienand 97c4735129 Move afsmon to mirror-update.opendev.org
This migrates the afsmon script from puppet deploying on
mirror-update.openstack.org to ansible deploying on
mirror-update.opendev.org.

There is nothing particularly special and this just a straight install
with some minor dependencies.  Since we have log publishing running on
the opendev.org server, we publish the update logs alongside the
others.

Change-Id: Ifa3b4d59f8d0fc23a4492e50348bab30766d5779
2020-02-12 14:38:48 +11:00

45 lines
1.1 KiB
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
- name: Setup periodic AFS release script
include_role:
name: afs-release
- name: Setup AFS monitoring script
include_role:
name: afsmon
# TODO: reprepro and other mirror components