From 312b9bec2473b3817daae9eb90b66e0ab49986c7 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 11 Feb 2021 13:18:40 +1100 Subject: [PATCH] Refactor AFS groups Both the filesevers and db servers have common key material deployed by the openafs-server-config role. Put both types of server in a new group "afs-server-common" so we can define this key material in just one group file on bridge. Then separate out the two into afs--server groups for consistent naming. Rename afs-admin for consistent naming. The service file is updated to reflect the new groups. Change-Id: Ifa5f251fdfb8de737ad2ed96491d45294ce23a0c --- inventory/service/groups.yaml | 15 +++++++++------ .../inventory_plugins/test-fixtures/results.yaml | 3 ++- playbooks/service-afs.yaml | 8 ++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/inventory/service/groups.yaml b/inventory/service/groups.yaml index f187ccca03..c22d084f10 100644 --- a/inventory/service/groups.yaml +++ b/inventory/service/groups.yaml @@ -1,10 +1,13 @@ plugin: yamlgroup groups: adns: adns*.open*.org - afs: - - afs01.dfw.openstack.org - - afs02.dfw.openstack.org - - afs01.ord.openstack.org + afs-server-common: + - afs[0-9]*.openstack.org + - afsdb[0-9]*.openstack.org + afs-file-server: + - afs[0-9]*.openstack.org + afs-db-server: + - afsdb[0-9]*.openstack.org afs-client: - review-dev[0-9]*.open*.org - mirror[0-9]*.opendev.org @@ -13,8 +16,8 @@ groups: - afsdb*.open*.org - afs[0-9]*.open*.org - static[0-9]*.opendev.org - afsadmin: mirror-update[0-9]*.openstack.org - afsdb: afsdb[0-9]*.open*.org + afs-admin: + - mirror-update[0-9]*.openstack.org ask: ask*.open*.org # NOTE: By default we keep the backup-server group empty as an # emergency escape hatch if a problem were to propage through diff --git a/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml b/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml index 08fd64e600..405da5deb5 100644 --- a/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml +++ b/playbooks/roles/install-ansible/files/inventory_plugins/test-fixtures/results.yaml @@ -8,7 +8,8 @@ results: - dns afs01.dfw.openstack.org: - - afs + - afs-server-common + - afs-file-server - afs-client firehose01.openstack.org: diff --git a/playbooks/service-afs.yaml b/playbooks/service-afs.yaml index 57377d9377..07367743a0 100644 --- a/playbooks/service-afs.yaml +++ b/playbooks/service-afs.yaml @@ -1,11 +1,11 @@ -- hosts: "afsdb:!disabled" +- hosts: "afs-db-server:!disabled" name: "AFS: configure db servers" strategy: free roles: - openafs-db-server -- hosts: "afs:!disabled" - name: "Configure AFS server" +- hosts: "afs-file-server:!disabled" + name: "Configure AFS file server" roles: - openafs-file-server @@ -20,7 +20,7 @@ register: vos_release_keypair # Note: relies on vos_release_keypair installed to mirror above -- hosts: "afs:!disabled" +- hosts: "afs-file-server:!disabled" name: "Allow remote vos_release" roles: - vos-release