Hi,
I’m using an inventory based on LDAP and have my own script to get the value sout of it. Currently I could only specify one value to a variable. I now changed the script a bit so I can get more.
This is an example from the output
→ ./ldap_inv.py --host infra-16.prod.btr.local [devel]
{
“scripts”: [
“SVN_BACKUP_AFTER.sh”,
“SVN_BACKUP.sh”
]
}
In my playbook I want to iterate over the “scripts” list in a copy command like this
- name: deploy backup script
action: copy src={{ item }} dest=/var/scripts/{{ item }}
with_items: scripts
This is what the playbook run returns
TASK: [deploy backup script] **************************************************
fatal: [infra-16.prod.btr.local] => input file not found at /home/vincent/BTR_INFRA/ansible/playbooks/roles/s3backup/files/SVN_BACKUP_AFTER.sh,SVN_BACKUP.sh or /home/vincent/BTR_INFRA/ansible/playbooks/SVN_BACKUP_AFTER.sh,SVN_BACKUP.sh
Both values are being pasted together.
What am I doing wrong?
_Vincent