From 543a02f05990238b2bfd4ffe2c7c0b9ddf961ff2 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Fri, 4 Nov 2022 09:23:46 +1100
Subject: [PATCH] infra-prod: use prod_bastion group

This is similar in purpose to
I137ab824b9a09ccb067b8d5f0bb2896192291883 to separate out where we are
talking to the bastion host from the executor, versus the nested
ansible CD run.

Add the host in the "prod_bastion" group, and switch the source setup
playbook to use "prod_bastion[0]".  This reduces the number of places
you have to update the bridge name when you change the host.

Change-Id: I66df4057b3990eed2230d894ff42d0a425a2381a
---
 playbooks/infra-prod/setup-keys.yaml | 8 ++++----
 playbooks/infra-prod/setup-src.yaml  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/playbooks/infra-prod/setup-keys.yaml b/playbooks/infra-prod/setup-keys.yaml
index 5fc23ff..f6712ad 100644
--- a/playbooks/infra-prod/setup-keys.yaml
+++ b/playbooks/infra-prod/setup-keys.yaml
@@ -12,11 +12,11 @@
         ansible_port: 22
         # Port 19885 is firewalled
         zuul_console_disabled: true
-        # Note this is the only host in the bastion group.  The playbooks
-        # are written to refer to "bastion[0]" rather than the hostname
-        # directly, so we can swap the hostname more easily.
+        # Playbooks are written to refer to "prod_bastion[0]" rather
+        # than the hostname directly, so we can swap the bridge
+        # hostname more easily.
         groups:
-          - bastion
+          - prod_bastion
 
     - name: Add bridge.o.o hostkey to known hosts
       known_hosts:
diff --git a/playbooks/infra-prod/setup-src.yaml b/playbooks/infra-prod/setup-src.yaml
index 1738140..d9537f4 100644
--- a/playbooks/infra-prod/setup-src.yaml
+++ b/playbooks/infra-prod/setup-src.yaml
@@ -1,4 +1,4 @@
-- hosts: bridge01.opendev.org
+- hosts: prod_bastion[0]
   tasks:
     - name: "Make sure a manual maintenance isn't going on"
       wait_for: