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') }}"