Hi
I am new to Ansible, I'm trying to copy a repo file from control node to manage node and got the below error when executing my playbook.
Error:
fatal: [10.192.128.154]: FAILED! => {"changed": false, "checksum": "bceb47957aa7709b77108019f398d05b481ddca3", "msg": "Destination /etc/yum.repos.d not writable"}
I have the used privilege_escalation and play book as below
[privilege_escalation]
become = true
become_method = enable
become_user = root
become_ask_pass = true
playbook:
- name: Copy function
hosts: test
become: yes
tasks:
- name: Copy repo file
copy:
src: /etc/yum.repos.d/rhel76-kernel-test.repo
dest: /etc/yum.repos.d/rhel76-kernel-test.repo
My user has the privilege to execute sudo commands on both the nodes. Please help to fix the error.
Thank you
I am new to Ansible, I'm trying to copy a repo file from control node to manage node and got the below error when executing my playbook.
Error:
fatal: [10.192.128.154]: FAILED! => {"changed": false, "checksum": "bceb47957aa7709b77108019f398d05b481ddca3", "msg": "Destination /etc/yum.repos.d not writable"}
I have the used privilege_escalation and play book as below
[privilege_escalation]
become = true
become_method = enable
become_user = root
become_ask_pass = true
playbook:
- name: Copy function
hosts: test
become: yes
tasks:
- name: Copy repo file
copy:
src: /etc/yum.repos.d/rhel76-kernel-test.repo
dest: /etc/yum.repos.d/rhel76-kernel-test.repo
My user has the privilege to execute sudo commands on both the nodes. Please help to fix the error.
Thank you