From 38b245a8be28dce088dc12878f5cb1980f0c45dd Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Wed, 7 Jun 2023 14:54:22 -0400 Subject: [PATCH] ansible: Deploy jenkin's SSH public key to standalone nodes 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 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 automation/ansible/group_vars/node_standalone.yml diff --git a/automation/ansible/group_vars/node_standalone.yml b/automation/ansible/group_vars/node_standalone.yml new file mode 100644 index 0000000..d6f5adb --- /dev/null +++ b/automation/ansible/group_vars/node_standalone.yml @@ -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' -- 2.34.1