ansible ssh debug, ssh config usage, copy step added
All checks were successful
Gitea Actions - molecule test work / Explore-terraform-molecule-Gitea-Action (push) Successful in 7m4s

This commit is contained in:
Mike Holloway 2025-01-07 19:34:57 -05:00
parent a12732a7b9
commit 23bee6e6f9

View File

@ -17,11 +17,20 @@
{{ lookup('env', 'ACT_RUNNER_DEPLOY_KEY') }} {{ lookup('env', 'ACT_RUNNER_DEPLOY_KEY') }}
dest: "~/.ssh/id_ed25519" dest: "~/.ssh/id_ed25519"
- name: ssh config setup
copy:
content: |
Host testlinode
Hostname {{ lookup('env', 'TARGET_IP_ADDRESS') }}
StrictHostKeyChecking accept-new
User root
IdentityFile ~/.ssh/id_ed25519
dest: "~/.ssh/config"
- name: Confirm we can reach - name: Confirm we can reach
command: command:
cmd: | cmd: |
ssh-add ~/.ssh/id_ed25519 ssh -vv -T testlinode
ssh -vv -o StrictHostKeyChecking=accept-new -T root@{{ lookup('env', 'TARGET_IP_ADDRESS') }}
retries: 12 retries: 12
delay: 10 delay: 10
register: isping register: isping
@ -43,9 +52,6 @@
linode: linode:
hosts: hosts:
testlinode: testlinode:
ansible_host: "{{ lookup('env', 'TARGET_IP_ADDRESS') }}"
ansible_ssh_private_key_file: "{{ lookup('env', 'HOME') }}/.ssh/id_ed25519"
ansible_user: root
ansible_connection: ssh ansible_connection: ssh
service_users: service_users:
- name: serviceuser1 - name: serviceuser1