On 13/06/2022 11:28, 'Shivakumar Venkataswamy' via Ansible Project wrote:
Hi team,I'm facing "Source /home/yum.repos.d not found" error while running playbook .. my playbook view like this .. please help out.
I suppose this directory is either missing on the remote machine or the ansible user doesn't have the proper permissions to access it. Regards Racke
--- - name: Copy Directory Example Local to Remote hosts: 172.16.13.160 become: true become_user: ansible tasks: - name: Copying the Directory and its contents copy: src: /home/yum.repos.d dest: /etc/ remote_src: yes owner: root group: root mode: 0644 - name: Copying the Directory and its contents become: yes become_user: ansible copy: src: /home/rpm-gpg dest: /etc/pki/ remote_src: yes owner: root group: root mode: 0644 - name: upgrade command: "{{ item }}" with_items: - yum update -y - yum upgrade -y Error: PLAY [Copy Directory Example Local to Remote] *********************************************************************************************************************************************************************************************** TASK [Gathering Facts] ********************************************************************************************************************************************************************************************************************** ok: [172.16.13.160] TASK [Copying the Directory and its contents] *********************************************************************************************************************************************************************************************** fatal: [172.16.13.160]: FAILED! => {"changed": false, "msg": "Source /home/yum.repos.d not found"} PLAY RECAP ********************************************************************************************************************************************************************************************************************************** 172.16.13.160 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0 -- 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/CAGq4xMTD4RP2AN%3DDZxs6Sg5X0HhhPaQ%3DZq9uvZS44dYMf9tq7g%40mail.gmail.com <https://groups.google.com/d/msgid/ansible-project/CAGq4xMTD4RP2AN%3DDZxs6Sg5X0HhhPaQ%3DZq9uvZS44dYMf9tq7g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
-- Automation expert - Ansible and friends Linux administrator & Debian maintainer Perl Dancer & conference hopper -- 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/6e30a8f4-be5d-7d31-7348-9ae5ed285f58%40linuxia.de.
OpenPGP_signature
Description: OpenPGP digital signature