From abd79df3c31cfe6eb1cd47466190cb8aebfdce55 Mon Sep 17 00:00:00 2001 From: djpbessems Date: Tue, 19 Apr 2022 18:12:13 +0200 Subject: [PATCH] Fix private/public key order --- .drone.yml | 4 +++- playbook.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a1a8708..caa862c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -19,7 +19,7 @@ steps: - ansible-galaxy collection install -r requirements.yml - | ansible-playbook \ - --extra-vars "repo_username=$${repo_username} repo_password=$${repo_password} hv_password=$${hv_password} root_password=$${root_password} private_key='$${private_key}'" \ + --extra-vars "repo_username=$${repo_username} repo_password=$${repo_password} hv_password=$${hv_password} root_password=$${root_password} public_key='$${public_key}'" \ playbook.yml environment: repo_username: @@ -32,6 +32,8 @@ steps: from_secret: root_password private_key: from_secret: ssh_privatekey + public_key: + from_secret: ssh_publickey volumes: - name: scratch path: /scratch diff --git a/playbook.yml b/playbook.yml index 1fcade3..0344129 100644 --- a/playbook.yml +++ b/playbook.yml @@ -31,7 +31,7 @@ properties: guestinfo.hostname: "{{ cluster.name | upper }}-{{ (item.ip | checksum)[-5:] | upper }}" guestinfo.rootpw: "{{ root_password }}" - guestinfo.rootsshkey: "{{ private_key }}" + guestinfo.rootsshkey: "{{ public_key }}" guestinfo.ntpserver: "{{ network.ntpserver }}" guestinfo.ipaddress: "{{ item.ip | ansible.utils.ipaddr('address') }}" guestinfo.prefixlength: "{{ item.ip | ansible.utils.ipaddr('prefix') }}"