Further Example:
Hosts file:
[group1]
server1
server2
[group2]
server3
server4
Playbook:
---
- hosts: group2
tasks:
- name: "copy file from 147 to 149 from 141"
synchronize:
src: /root/gopi
dest: /root/gopi
delegate_to: ____ <----- delegate to one of the hosts
listed under group2
On Thursday, January 4, 2018 at 7:42:39 AM UTC, Gopi Krishna wrote:
>
> Hi,
>
> My hosts file:
>
> [ebs]
> xx.xx.xx.xx
>
> [source]
> xx.xx.xx.xx
>
> playbook:
>
> ---
> - hosts: source
> tasks:
> - name: "copy file from 147 to 149 from 141"
> synchronize:
> src: /root/gopi
> dest: /root/gopi
> delegate_to: ebs
>
> when im running this playbook , i am getting the below error
>
>
> TASK [copy file from 147 to 149 from 141]
> ********************************************************************************************
> fatal: [localhost]: UNREACHABLE! => {"changed": false, "msg": "Failed to
> connect to the host via ssh: ssh: Could not resolve hostname ebs: Name or
> service not known\r\n", "unreachable": true}
>
>
> could somebody tell me whats wrong with the code.
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/4b40b926-c148-4f48-8744-5a5b0eab05ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.