You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my playbook I have two stages:
1- the first part creates a new VPS on a cloud provider. (The VPS is created with an ssh key that has an ID in that cloud provider.)
2- the second configures that VPS.
....
....
- name: Add the new vps to inventory
ansible.builtin.add_host:
name: "{{ vps_ip }}"
groups: new_vps
ansible_host: "{{ vps_ip }}"
ansible_user: root
ansible_ssh_host_key_checking: false
- name: Configure the new VPS
hosts: new_vps
gather_facts: yes
tasks:
- name: Debug
debug:
msg: configuring the newly created VPS
...
...
Ansible tries to connect the the VPS in the second stage but fails because it needs the ssh key.
The ssh key is defined in the Key Store in Semaphore.
Is there a way to pass that ssh key to ansible so that it can be used in the second stage?
Related to
Ansible (task execution)
The text was updated successfully, but these errors were encountered:
Question
In my playbook I have two stages:
1- the first part creates a new VPS on a cloud provider. (The VPS is created with an ssh key that has an ID in that cloud provider.)
2- the second configures that VPS.
Ansible tries to connect the the VPS in the second stage but fails because it needs the ssh key.
The ssh key is defined in the Key Store in Semaphore.
Is there a way to pass that ssh key to ansible so that it can be used in the second stage?
Related to
Ansible (task execution)
The text was updated successfully, but these errors were encountered: