From 5ba37ced60ba4a58fd9b73909ce2e4baad8d8a0e Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 7 Jul 2022 10:58:50 +1000 Subject: [PATCH] paste: move certificate to group variable Similar to Id98768e29a06cebaf645eb75b39e4dc5adb8830d, move the certificate variables to the group definition file, so that we don't have to duplicate handlers or definitions for the testing host. Change-Id: I6650f5621a4969582f40700232a596d84e2b4a06 --- inventory/service/group_vars/paste.yaml | 5 +++++ inventory/service/host_vars/paste01.opendev.org.yaml | 5 ----- playbooks/roles/letsencrypt-create-certs/handlers/main.yaml | 5 +---- .../zuul/templates/host_vars/paste99.opendev.org.yaml.j2 | 5 ----- zuul.d/infra-prod.yaml | 3 +-- 5 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 inventory/service/host_vars/paste01.opendev.org.yaml diff --git a/inventory/service/group_vars/paste.yaml b/inventory/service/group_vars/paste.yaml index 5745b3db1e..9d0b7298b7 100644 --- a/inventory/service/group_vars/paste.yaml +++ b/inventory/service/group_vars/paste.yaml @@ -1,3 +1,8 @@ +letsencrypt_certs: + paste-opendev-org-main: + - '{{ inventory_hostname }}' + - paste.opendev.org + - paste.openstack.org borg_backup_excludes_extra: # live db; dumped with mysqldump - /var/lib/lodgeit diff --git a/inventory/service/host_vars/paste01.opendev.org.yaml b/inventory/service/host_vars/paste01.opendev.org.yaml deleted file mode 100644 index b2ef6cff36..0000000000 --- a/inventory/service/host_vars/paste01.opendev.org.yaml +++ /dev/null @@ -1,5 +0,0 @@ -letsencrypt_certs: - paste01-opendev-org-main: - - paste01.opendev.org - - paste.opendev.org - - paste.openstack.org diff --git a/playbooks/roles/letsencrypt-create-certs/handlers/main.yaml b/playbooks/roles/letsencrypt-create-certs/handlers/main.yaml index 4e9234eb56..1d5cf9d2a7 100644 --- a/playbooks/roles/letsencrypt-create-certs/handlers/main.yaml +++ b/playbooks/roles/letsencrypt-create-certs/handlers/main.yaml @@ -165,10 +165,7 @@ # paste -- name: letsencrypt updated paste01-opendev-org-main - include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml - -- name: letsencrypt updated paste99-opendev-org-main +- name: letsencrypt updated paste-opendev-org-main include_tasks: roles/letsencrypt-create-certs/handlers/restart_apache.yaml # review diff --git a/playbooks/zuul/templates/host_vars/paste99.opendev.org.yaml.j2 b/playbooks/zuul/templates/host_vars/paste99.opendev.org.yaml.j2 index 11d2ff17c9..58a6dbe079 100644 --- a/playbooks/zuul/templates/host_vars/paste99.opendev.org.yaml.j2 +++ b/playbooks/zuul/templates/host_vars/paste99.opendev.org.yaml.j2 @@ -1,7 +1,2 @@ lodgeit_secret_key: secretkey lodgeit_db_password: password -letsencrypt_certs: - paste99-opendev-org-main: - - paste99.opendev.org - - paste.opendev.org - - paste.openstack.org diff --git a/zuul.d/infra-prod.yaml b/zuul.d/infra-prod.yaml index 86e9af16ab..c190ac7f2e 100644 --- a/zuul.d/infra-prod.yaml +++ b/zuul.d/infra-prod.yaml @@ -281,8 +281,7 @@ files: - inventory/base - playbooks/service-paste.yaml - - inventory/service/host_vars/paste01.opendev.org.yaml - - inventory/service/group_vars/paste + - inventory/service/group_vars/paste.yaml - playbooks/roles/install-docker/ - playbooks/roles/pip3/ - playbooks/roles/lodgeit/