Re: [EXTERNAL] Re: [ansible-project] rsync failure

2022-08-01 Thread Ashok Reddy
both are in the different hostnames.

On Mon, Aug 1, 2022 at 6:43 PM 'Hearn, Stan J.' via Ansible Project <
ansible-project@googlegroups.com> wrote:

> Isn't src and dest the same place?
>
>
>
>   ansible.posix.synchronize:
>
> src: /root
>
> dest: /root
>
>
>
>
>
> *From:* ansible-project@googlegroups.com 
> *On Behalf Of *John Petro
> *Sent:* Monday, August 1, 2022 8:47 AM
> *To:* ansible-project@googlegroups.com
> *Subject:* [EXTERNAL] Re: [ansible-project] rsync failure
>
>
>
> Have you run the playbook in verbose mode to get more detail?  Maybe
> there's a mis-spelling in the inventory hostname you used or something in
> the inventory.
>
>
>
> The only other idea I have is to copy/paste the msg section that starts
> with "Could" into your search engine of choice and see what comes up
> there.
>
>
>
> --John
>
>
>
> On Mon, Aug 1, 2022, 7:07 AM Ashok Reddy  wrote:
>
> Hi Team,
>
>
>
> whatever i've mentioned the inventory hostname just ref i.e not the actual
> one.
>
>
>
> On Mon, Aug 1, 2022 at 4:18 PM Dick Visser  wrote:
>
>
>
>
>
> On Mon, 1 Aug 2022 at 12:23, Ashok Reddy  wrote:
>
> ---
>
> - hosts: all
>
>   become: true
>
>   become_method: sudo
>
>   gather_facts: true
>
>   tasks:
>
> - name: block
>
>   block:
>
> - name: rsync
>
>   command: "cat /proc/meminfo"
>
>   rescue:
>
> - debug:
>
> msg: proceed to install
>
> - name: install rsync
>
>   dnf:
>
> name: rsync
>
> state: present
>
>   delegate_to: localhost
>
> - name: sync
>
>   ansible.posix.synchronize:
>
> src: /root
>
> dest: /root
>
>   delegate_to: inventory hostname
>
>
>
> Error:
>
>
>
>  FAILED! => {"changed": false, "msg": "Could not determine controller
> hostname for rsync to send to"}
>
>
>
>
>
> The listeral string "inventory hostname" is not a valid hostname. Fix that.
>
> Also, "become_method: sudo" and "gather_facts: true" are both the same as
> the defaults, so you can leave that out.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5*2BB2yQ0*2BRm_S-t4JgayH6TJKfxS97*2Bz0Kwinw*40mail.gmail.com?utm_medium=email_source=footer__;JSUlJQ!!Fto3Xw!p8hbvtmqZLKa5gh23odUuEQXeiF_iXCzcEbwK8iUtKpbchG1RDJKoNZmPD3DRyu4wQUZTEdt89wc2VLCj-s$>
> .
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm*3DwmVzn4ja4iSTz9BKUpTQ*40mail.gmail.com?utm_medium=email_source=footer__;JSU!!Fto3Xw!p8hbvtmqZLKa5gh23odUuEQXeiF_iXCzcEbwK8iUtKpbchG1RDJKoNZmPD3DRyu4wQUZTEdt89wctl3ZhP0$>
> .
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAPAjob8hCdxBzPhP2CwhbEg6bq%3D9m-Gic4Cor2X%2BL50dHXdfyw%40mail.gmail.com
> <https://urldefense.com/v3/__https:/groups.google.com/d/msgid/ansible-project/CAPAjob8hCdxBzPhP2CwhbEg6bq*3D9m-Gic4Cor2X*2BL50dHXdfyw*40mail.gmail.com?utm_medium=email_source=footer__;JSUl!!Fto3Xw!p8hbvtmqZLKa5gh23odUuEQXeiF_iXCzcEbwK8iUtKpbchG1RDJKoNZmPD3DRyu4wQUZTEdt89wcjqtHGwU$>
> .
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/7dszRgDhwxY

Re: [ansible-project] rsync failure

2022-08-01 Thread John Petro
Have you run the playbook in verbose mode to get more detail?  Maybe
there's a mis-spelling in the inventory hostname you used or something in
the inventory.

The only other idea I have is to copy/paste the msg section that starts
with "Could" into your search engine of choice and see what comes up
there.

--John


On Mon, Aug 1, 2022, 7:07 AM Ashok Reddy  wrote:

> Hi Team,
>
> whatever i've mentioned the inventory hostname just ref i.e not the actual
> one.
>
> On Mon, Aug 1, 2022 at 4:18 PM Dick Visser  wrote:
>
>>
>>
>> On Mon, 1 Aug 2022 at 12:23, Ashok Reddy  wrote:
>>
>>> ---
>>>
>>> - hosts: all
>>>
>>>   become: true
>>>
>>>   become_method: sudo
>>>
>>>   gather_facts: true
>>>
>>>   tasks:
>>>
>>> - name: block
>>>
>>>   block:
>>>
>>> - name: rsync
>>>
>>>   command: "cat /proc/meminfo"
>>>
>>>   rescue:
>>>
>>> - debug:
>>>
>>> msg: proceed to install
>>>
>>> - name: install rsync
>>>
>>>   dnf:
>>>
>>> name: rsync
>>>
>>> state: present
>>>
>>>   delegate_to: localhost
>>>
>>> - name: sync
>>>
>>>   ansible.posix.synchronize:
>>>
>>> src: /root
>>>
>>> dest: /root
>>>
>>>   delegate_to: inventory hostname
>>>
>>>
>>> Error:
>>>
>>>
>>>  FAILED! => {"changed": false, "msg": "Could not determine controller
>>> hostname for rsync to send to"}
>>>
>>
>>
>> The listeral string "inventory hostname" is not a valid hostname. Fix
>> that.
>> Also, "become_method: sudo" and "gather_facts: true" are both the same as
>> the defaults, so you can leave that out.
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPAjob8hCdxBzPhP2CwhbEg6bq%3D9m-Gic4Cor2X%2BL50dHXdfyw%40mail.gmail.com.


Re: [ansible-project] rsync failure

2022-08-01 Thread Dick Visser
Well in that case you will have to find out for yourself why it doesn't
work.

On Mon, 1 Aug 2022 at 13:07, Ashok Reddy  wrote:

> Hi Team,
>
> whatever i've mentioned the inventory hostname just ref i.e not the actual
> one.
>
> On Mon, Aug 1, 2022 at 4:18 PM Dick Visser  wrote:
>
>>
>>
>> On Mon, 1 Aug 2022 at 12:23, Ashok Reddy  wrote:
>>
>>> ---
>>>
>>> - hosts: all
>>>
>>>   become: true
>>>
>>>   become_method: sudo
>>>
>>>   gather_facts: true
>>>
>>>   tasks:
>>>
>>> - name: block
>>>
>>>   block:
>>>
>>> - name: rsync
>>>
>>>   command: "cat /proc/meminfo"
>>>
>>>   rescue:
>>>
>>> - debug:
>>>
>>> msg: proceed to install
>>>
>>> - name: install rsync
>>>
>>>   dnf:
>>>
>>> name: rsync
>>>
>>> state: present
>>>
>>>   delegate_to: localhost
>>>
>>> - name: sync
>>>
>>>   ansible.posix.synchronize:
>>>
>>> src: /root
>>>
>>> dest: /root
>>>
>>>   delegate_to: inventory hostname
>>>
>>>
>>> Error:
>>>
>>>
>>>  FAILED! => {"changed": false, "msg": "Could not determine controller
>>> hostname for rsync to send to"}
>>>
>>
>>
>> The listeral string "inventory hostname" is not a valid hostname. Fix
>> that.
>> Also, "become_method: sudo" and "gather_facts: true" are both the same as
>> the defaults, so you can leave that out.
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAF8BbLZ-%2BBe1aDpKKv5%2BWY8mS7GoK7%2BTsWebbWOj0QR%2BqQSNHg%40mail.gmail.com.


Re: [ansible-project] rsync failure

2022-08-01 Thread Ashok Reddy
Hi Team,

whatever i've mentioned the inventory hostname just ref i.e not the actual
one.

On Mon, Aug 1, 2022 at 4:18 PM Dick Visser  wrote:

>
>
> On Mon, 1 Aug 2022 at 12:23, Ashok Reddy  wrote:
>
>> ---
>>
>> - hosts: all
>>
>>   become: true
>>
>>   become_method: sudo
>>
>>   gather_facts: true
>>
>>   tasks:
>>
>> - name: block
>>
>>   block:
>>
>> - name: rsync
>>
>>   command: "cat /proc/meminfo"
>>
>>   rescue:
>>
>> - debug:
>>
>> msg: proceed to install
>>
>> - name: install rsync
>>
>>   dnf:
>>
>> name: rsync
>>
>> state: present
>>
>>   delegate_to: localhost
>>
>> - name: sync
>>
>>   ansible.posix.synchronize:
>>
>> src: /root
>>
>> dest: /root
>>
>>   delegate_to: inventory hostname
>>
>>
>> Error:
>>
>>
>>  FAILED! => {"changed": false, "msg": "Could not determine controller
>> hostname for rsync to send to"}
>>
>
>
> The listeral string "inventory hostname" is not a valid hostname. Fix that.
> Also, "become_method: sudo" and "gather_facts: true" are both the same as
> the defaults, so you can leave that out.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com
> 
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com.


Re: [ansible-project] rsync failure

2022-08-01 Thread Dick Visser
On Mon, 1 Aug 2022 at 12:23, Ashok Reddy  wrote:

> ---
>
> - hosts: all
>
>   become: true
>
>   become_method: sudo
>
>   gather_facts: true
>
>   tasks:
>
> - name: block
>
>   block:
>
> - name: rsync
>
>   command: "cat /proc/meminfo"
>
>   rescue:
>
> - debug:
>
> msg: proceed to install
>
> - name: install rsync
>
>   dnf:
>
> name: rsync
>
> state: present
>
>   delegate_to: localhost
>
> - name: sync
>
>   ansible.posix.synchronize:
>
> src: /root
>
> dest: /root
>
>   delegate_to: inventory hostname
>
>
> Error:
>
>
>  FAILED! => {"changed": false, "msg": "Could not determine controller
> hostname for rsync to send to"}
>


The listeral string "inventory hostname" is not a valid hostname. Fix that.
Also, "become_method: sudo" and "gather_facts: true" are both the same as
the defaults, so you can leave that out.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com.


Re: [ansible-project] rsync failure

2022-08-01 Thread Ashok Reddy
---

- hosts: all

  become: true

  become_method: sudo

  gather_facts: true

  tasks:

- name: block

  block:

- name: rsync

  command: "cat /proc/meminfo"

  rescue:

- debug:

msg: proceed to install

- name: install rsync

  dnf:

name: rsync

state: present

  delegate_to: localhost

- name: sync

  ansible.posix.synchronize:

src: /root

dest: /root

  delegate_to: inventory hostname


Error:


 FAILED! => {"changed": false, "msg": "Could not determine controller
hostname for rsync to send to"}



On Mon, Aug 1, 2022 at 1:07 PM dulhaver via Ansible Project <
ansible-project@googlegroups.com> wrote:

>
> > On 08/01/2022 9:04 AM CEST Ashok Reddy  wrote:
> >
> >
> > ---
> > - hosts: all
> >  become: true
> >  become_method: sudo
> >  gather_facts: true
> >  tasks:
> >  - name: rsync
> >  ansible.posix.synchronize:
> >  src: /root
> >  dest: /root
> >  delegate_to: hostname
> >
> >
> > error:
> >
> >
> > TASK [rsync]
> **
> > fatal: [ FAILED! => {"changed": false, "msg": "Failed to find required
> executable \"rsync\" in paths:
> /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin"}
> > fatal: [localhost -> ]: FAILED! => {"changed": false, "msg": "Could not
> determine controller hostname for rsync to send to"}
> >
> > PLAY RECAP
> ***
>
> my guess: Ansible detects that the host has no rsync installed, so the
> TASK can not be executed.
> So you'd you have to create a preceeding (package/yum/apt) TASK that makes
> sure rsync is installed on the hosts in order to make this work.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/931614963.59128.1659339453322%40office.mailbox.org
> .
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKRLcHivNDFmVEMYgo6WLL%3DtHsa1RJK1BGOeLLt6pNZcAO4T9A%40mail.gmail.com.


Re: [ansible-project] rsync failure

2022-08-01 Thread dulhaver via Ansible Project


> On 08/01/2022 9:04 AM CEST Ashok Reddy  wrote:
> 
> 
> ---
> - hosts: all
>  become: true
>  become_method: sudo
>  gather_facts: true
>  tasks:
>  - name: rsync
>  ansible.posix.synchronize:
>  src: /root
>  dest: /root
>  delegate_to: hostname
> 
> 
> error:
> 
> 
> TASK [rsync] 
> **
> fatal: [ FAILED! => {"changed": false, "msg": "Failed to find required 
> executable \"rsync\" in paths: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin"}
> fatal: [localhost -> ]: FAILED! => {"changed": false, "msg": "Could not 
> determine controller hostname for rsync to send to"}
> 
> PLAY RECAP 
> ***

my guess: Ansible detects that the host has no rsync installed, so the TASK can 
not be executed. 
So you'd you have to create a preceeding (package/yum/apt) TASK that makes sure 
rsync is installed on the hosts in order to make this work.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/931614963.59128.1659339453322%40office.mailbox.org.


[ansible-project] rsync failure

2022-08-01 Thread Ashok Reddy
---
- hosts: all
  become: true
  become_method: sudo
  gather_facts: true
  tasks:
- name: rsync
  ansible.posix.synchronize:
src: /root
dest: /root
  delegate_to: hostname

error:


TASK [rsync] 
**
fatal: [ FAILED! => {"changed": false, "msg": "Failed to find required 
executable \"rsync\" in paths: 
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin"}
fatal: [localhost -> ]: FAILED! => {"changed": false, "msg": "Could not 
determine controller hostname for rsync to send to"}

PLAY RECAP 
***

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9a5b2c02-2146-4dd1-be1e-f6fcf2598940n%40googlegroups.com.