I'm not sure totally how running an inventory dynamically with a [1] etc.
works.
Have you tried running that last part with a -vvvv option? It looks like
its now got to the point where it knows about the host but is hanging
copying the file. So your inventory should be okay if its got past there
On Friday, January 5, 2018 at 7:33:34 AM UTC, Gopi Krishna wrote:
>
> by the way i tried like this:
> - hosts: oraclesource[0]
> tasks:
> - name: "copy file from 147 to 149 from 141"
> synchronize:
> src: /root/gopi
> dest: /root/gopi
> delegate_to: "{{ item }}"
> with_items:
> - "{{ groups['oraclesource'][1] }}"
>
> script is running but it stuck's at:
>
> PLAY [oraclesource[0]]
> ***************************************************************************************************************
>
> TASK [Gathering Facts]
> ***************************************************************************************************************
> ok: [10.210.8.149]
>
> TASK [copy file from 147 to 149 from 141]
> ********************************************************************************************
>
>
> this is where the program is being idle
>
> On Thursday, January 4, 2018 at 1:12:39 PM UTC+5:30, 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/c293b319-8d77-4fa9-b6c5-3af502381618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.