Hi, i try copy files locally but not work.
This is my playbook:
- name: “Generando archivos de configuracion mq2mq y supervisor”
copy:
src: ‘{{ item.src }}’
dest: ‘{{ item.dest }}’
remote_src: no
with_items:
-
{ src: ‘{{ skel_mq2mq_path }}/settings-prosrm-XX-prod.py’, dest: ‘{{ skel_mq2mq_path }}/settings-prosrm-{{ carrier }}-prod.py’ }
-
{ src: ‘{{ skel_mq2mq_path }}/settings-prosrm-XX-2res-prod.py’, dest: ‘{{ skel_mq2mq_path }}/settings-prosrm-{{ carrier }}-2res-prod.py’ }
-
{ src: ‘{{ skel_supervisor_path }}/mq2mq-prosrm-XX-prod.conf’, dest: ‘{{ skel_supervisor_path }}/mq2mq-prosrm-{{ carrier }}-prod.conf’ }
-
{ src: ‘{{ skel_supervisor_path }}/mq2mq-prosrm-XX-2res-prod.conf’, dest: '{{ skel_supervisor_path }}/mq2mq-prosrm-{{ carrier }}-2res-prod.co
nf’ }
group_vars/all.yaml
skel_mq2mq_path: ‘/etc/ansible/rms_sftp/template_prod/mq2mq_skel’
skel_supervisor_path: ‘/etc/ansible/rms_sftp/template_prod/supervisor_skel’
The directory exits:
/etc/ansible/rms_sftp/template_prod/supervisor_skel
total 8
-rw-rw-r-- 1 emanuel emanuel 335 sep 2 16:44 mq2mq-prosrm-XX-2res-prod.conf
-rw-rw-r-- 1 emanuel emanuel 316 sep 2 16:45 mq2mq-prosrm-XX-prod.conf
I see this error:
“item”: {
“dest”: “/etc/ansible/rms_sftp/template_prod/mq2mq_skel/settings-prosrm-XY-2res-prod.py”,
“src”: “/etc/ansible/rms_sftp/template_prod/mq2mq_skel/settings-prosrm-XX-2res-prod.py”
},
“msg”: “Destination directory /etc/ansible/rms_sftp/template_prod/mq2mq_skel does not exist”
}
what i’m doing wrong?
Regards,