ansible: Deploy jenkin's SSH public key to standalone nodes
authorKienan Stewart <kstewart@efficios.com>
Wed, 7 Jun 2023 18:54:22 +0000 (14:54 -0400)
committerKienan Stewart <kstewart@efficios.com>
Wed, 7 Jun 2023 18:54:22 +0000 (14:54 -0400)
If ansible is run against any standalone nodes, the public set in
/root/.ssh/authorized_keys will be removed, and new connections will
fail until the VM is reset from the base-configuration snapshot if it
exists.

When deploying new nodes, ensuring the key is in the root user's
authorized_keys file in the first place avoids creating snapshots that
aren't accessible by the jenkin's user.

Change-Id: I37cc8e804aa4dea649df1558ccf8290d5df6be6f

automation/ansible/group_vars/node_standalone.yml [new file with mode: 0644]

diff --git a/automation/ansible/group_vars/node_standalone.yml b/automation/ansible/group_vars/node_standalone.yml
new file mode 100644 (file)
index 0000000..d6f5adb
--- /dev/null
@@ -0,0 +1,5 @@
+---
+# jenkins connects to standalone nodes as the root user
+extra_root_ssh_authorized_keys:
+  # yamllint disable-line rule:line-length
+  - 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA3fwpioVLDoCQsQkYK5bOwPb8N0EXeYm2MleBQTfqxtKaqWWbmUtFXAiyclKHRspjcAiIKwwqLyhPopHBqJzmXnB0GsfGmxXJ6wSBgKJ4kdBVRM+nKlK0wCl1oQkFeV/Xl3jzt1Ey96XiNWlesfkvgcMCpsJzQ7/xRb9IcghskzlQbLOwDNir/156JgAYUYvOLqNCcE+xcgPxJGanfZDXTLkfBYxaeaB8isBPeEU6fhPvu/W055M1uB7E0qhcbFtuKCBu1Fg4jzsW4yDU8+ZB1b5mAXwEAuMbVGMrOf4rjtTpGpQd6XFsXpFT28NU1u5j2cUbtANJalkNDX/UY6XJ jenkins@ci-master-02'
This page took 0.031267 seconds and 4 git commands to generate.