Hello!
I have a playbook where i want to transfer from a remote host to another host and use a service user and its keys in the default location /home/user/.ssh i can move files when i put the keys to ~/.ssh/, but with my other playbook it stops at the sncronize task and just stops when i end the template and the log just stops and schows nor errors.
The Playbook:
`---
name: Generate SSH keypair on remote hosts and distribute keys
hosts:
192.168.151.141
192.168.151.237
become: true
tasks:
name: Create a "sync_src" group
ansible.builtin.group_by:
key: sync_src
when: ansible_default_ipv4.address == '192.168.151.237'
name: Create a "sync_dst" group
ansible.builtin.group_by:
key: sync_dst
when: ansible_default_ipv4.address == '192.168.151.141'
name: Create SSH keypair in /tmp
hosts: localhost
tasks:
Hello! I have a playbook where i want to transfer from a remote host to another host and use a service user and its keys in the default location /home/user/.ssh i can move files when i put the keys to ~/.ssh/, but with my other playbook it stops at the sncronize task and just stops when i end the template and the log just stops and schows nor errors. The Playbook: `---
name: Generate SSH keypair on remote hosts and distribute keys hosts:
192.168.151.141
192.168.151.237 become: true tasks:
name: Create a "sync_src" group ansible.builtin.group_by: key: sync_src when: ansible_default_ipv4.address == '192.168.151.237'
name: Create a "sync_dst" group ansible.builtin.group_by: key: sync_dst when: ansible_default_ipv4.address == '192.168.151.141'
name: Create SSH keypair in /tmp hosts: localhost tasks:
name: Distribute the SSH public key hosts: sync_dst tasks:
name: Distribute the SSH private key hosts: sync_src tasks:
name: Synchronize files to target host hosts: sync_dst tasks:
job_3856.txt The really nice peaople in the ansible forum have sadly no idea what the issue could be.
Im very grateful for your input!!
MDuerre