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 <[email protected]> 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 <[email protected]> wrote: > >> >> >> On Mon, 1 Aug 2022 at 12:23, Ashok Reddy <[email protected]> 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 [email protected]. >> 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://groups.google.com/d/msgid/ansible-project/CAF8BbLa4-JSaG5%2BB2yQ0%2BRm_S-t4JgayH6TJKfxS97%2Bz0Kwinw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CAKRLcHg2Sbjz7Ysgkvb5NsFjn9xdm%3DwmVzn4ja4iSTz9BKUpTQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAF8BbLZ-%2BBe1aDpKKv5%2BWY8mS7GoK7%2BTsWebbWOj0QR%2BqQSNHg%40mail.gmail.com.
