Manage afsdb servers with Ansible

Move common setup steps into a openafs-server-config role, and create
openafs-file-server and openafs-db-server roles to manage fileserver
and db servers respectively.

Modify the playbook to run these roles against the AFS servers.

Change-Id: I4e80ad8ffe1d4992e405ea516b8762109758d7eb
This commit is contained in:
Ian Wienand 2021-01-19 15:48:23 +11:00
parent 92250eca82
commit c98505c8f2
10 changed files with 26 additions and 21 deletions

View File

@ -142,8 +142,6 @@ groups:
pbx: pbx:
- pbx[0-9]*.opendev.org - pbx[0-9]*.opendev.org
puppet: puppet:
- afsdb01.openstack.org
- afsdb02.openstack.org
- ask*.open*.org - ask*.open*.org
- backup[0-9]*.openstack.org - backup[0-9]*.openstack.org
- cacti[0-9]*.open*.org - cacti[0-9]*.open*.org
@ -176,8 +174,6 @@ groups:
- wiki-dev[0-9]*.openstack.org - wiki-dev[0-9]*.openstack.org
- wiki[0-9]*.openstack.org - wiki[0-9]*.openstack.org
puppet4: puppet4:
- afsdb01.openstack.org
- afsdb02.openstack.org
- ask*.open*.org - ask*.open*.org
- ask-staging[0-9]*.open*.org - ask-staging[0-9]*.open*.org
- cacti[0-9]*.open*.org - cacti[0-9]*.open*.org

View File

@ -0,0 +1 @@
Configure a host as an AFS db server (pts/vldb)

View File

@ -0,0 +1,10 @@
- name: Include config
include_role:
name: openstack-server-config
- name: Install packages
package:
name:
- openafs-dbserver
- openafs-krb5
state: latest

View File

@ -0,0 +1 @@
Configure a host as an AFS fileserver

View File

@ -0,0 +1,11 @@
- name: Include config
include_role:
name: openstack-server-config
- name: Install packages
package:
name:
- openafs-fileserver
- openafs-client
- openafs-krb5
state: latest

View File

@ -75,11 +75,3 @@
name: openafs-modules-dkms name: openafs-modules-dkms
state: latest state: latest
install_recommends: no install_recommends: no
- name: Install packages
package:
name:
- openafs-fileserver
- openafs-client
- openafs-krb5
state: latest

View File

@ -1,19 +1,13 @@
- hosts: 'localhost:!disabled'
name: Install puppet role/modules
strategy: linear
roles:
- puppet-setup-ansible
- hosts: "afsdb:!disabled" - hosts: "afsdb:!disabled"
name: "AFS: run puppet on the AFS servers" name: "AFS: configure db servers"
strategy: free strategy: free
roles: roles:
- puppet-run - openafs-db-server
- hosts: "afs:!disabled" - hosts: "afs:!disabled"
name: "Configure AFS server" name: "Configure AFS server"
roles: roles:
- openafs-server - openafs-file-server
- hosts: "mirror-update:!disabled" - hosts: "mirror-update:!disabled"
name: "Create key for remote vos release" name: "Create key for remote vos release"