Store SSH key
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-04-19 17:04:09 +02:00
parent 3f81897dfc
commit dfdd2e0075
2 changed files with 7 additions and 6 deletions

View File

@ -12,10 +12,10 @@ steps:
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: always pull: always
commands: commands:
# - | - |
# mkdir ~/.ssh && \ mkdir ~/.ssh && \
# echo "$${private_key}" > ~/.ssh/id_rsa && \ echo "$${private_key}" > ~/.ssh/id_rsa && \
# chmod 0600 ~/.ssh/id_rsa chmod 0600 ~/.ssh/id_rsa
- ansible-galaxy collection install -r requirements.yml - ansible-galaxy collection install -r requirements.yml
- | - |
ansible-playbook \ ansible-playbook \
@ -30,8 +30,8 @@ steps:
from_secret: hv_password from_secret: hv_password
root_password: root_password:
from_secret: root_password from_secret: root_password
# private_key: private_key:
# from_secret: ssh_privatekey from_secret: ssh_privatekey
volumes: volumes:
- name: scratch - name: scratch
path: /scratch path: /scratch

View File

@ -56,6 +56,7 @@
ansible.builtin.set_fact: ansible.builtin.set_fact:
nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}" nodes: "{{ nodes | default([]) + [ {'name': item.instance.hw_name, 'ip': item.item.item.ip | ansible.utils.ipaddr('address')} ] }}"
with_items: "{{ job_poll | json_query('results[*]') }}" with_items: "{{ job_poll | json_query('results[*]') }}"
# Purely to avoid large amount of spam; no sensitive data here.
no_log: true no_log: true
- name: Register new VM's in inventory - name: Register new VM's in inventory