system-config/playbooks/service-afs.yaml
Ian Wienand 7683fa11b3 openafs-server : add ansible roles for OpenAFS servers
This starts at migrating OpenAFS server setup to Ansible.

Firstly we split up the groups and explicitly name hosts, as we will
me migrating each one step-by-step.  We split out 1.8 hosts into a new
afs-1.8 group; the first host is afs01.ord.openstack.org which already
has openafs 1.8 installed manually.

An openafs-server role is introduced that does the same setup as the
extant puppet.

The AFS job is renamed to infra-prod-afs as the puppet component will
eventually disappear.  Otherwise it runs in the same way, but also
runs the openafs-server role for the 1.8 servers.

Once this is merged, we can run it against afs01.ord.openstack.org to
ensure it works and is idempotent.  We can then take on upgrading the
other file servers, and work further on the database servers.

Change-Id: I7998af43961999412f58a78214f4b5387713d30e
2021-01-19 08:08:33 +11:00

33 lines
801 B
YAML

- hosts: 'localhost:!disabled'
name: Install puppet role/modules
strategy: linear
roles:
- puppet-setup-ansible
- hosts: "afs:afsdb:!disabled"
name: "AFS: run puppet on the AFS servers"
strategy: free
roles:
- puppet-run
- hosts: "afs-1.8:!disabled"
name: "Configure AFS server"
roles:
- openafs-server
- hosts: "mirror-update:!disabled"
name: "Create key for remote vos release"
tasks:
# Note done as root because all the update scripts run as root
- name: Create vos release keypair
openssh_keypair:
path: /root/.ssh/id_vos_release
type: ed25519
register: vos_release_keypair
# Note: relies on vos_release_keypair installed to mirror above
- hosts: "afs:!disabled"
name: "Allow remote vos_release"
roles:
- vos-release