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
pull: always
commands:
# - |
# mkdir ~/.ssh && \
# echo "$${private_key}" > ~/.ssh/id_rsa && \
# chmod 0600 ~/.ssh/id_rsa
- |
mkdir ~/.ssh && \
echo "$${private_key}" > ~/.ssh/id_rsa && \
chmod 0600 ~/.ssh/id_rsa
- ansible-galaxy collection install -r requirements.yml
- |
ansible-playbook \
@ -30,8 +30,8 @@ steps:
from_secret: hv_password
root_password:
from_secret: root_password
# private_key:
# from_secret: ssh_privatekey
private_key:
from_secret: ssh_privatekey
volumes:
- name: scratch
path: /scratch

View File

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