I have an Ansible role (resides in ../roles/rolename/tasks) which goes like 
this - 

- name: Creating the PowerShell Scripts necessary
  template: src=script.ps1 dest=/tmp/{{item}}.ps1
  with_items: "{{ names }}"
  delegate_to: localhost

The script.ps1 shown under src resides in ../roles/rolename/templates/. 
After running the playbook if I check the Ansible Controller VMs /tmp 
folder, I don't see the files that are supposed to be created. The *names* 
are machine1, machine2 etc. I have tried changing localhost to 127.0.0.1 
but that didn't help me.

The debug log reports success - 

changed: [machine1 -> localhost] => (item=machine1) => {"changed": true, 
......"dest": "/tmp/machine1.ps1"....}
changed: [machine2 -> localhost] => (item=machine1) => {"changed": true, 
......"dest": "/tmp/machine2.ps1"....}

Actually, the next step in my role is expected to copy the files generated 
in /tmp/ to a specified location in machine1, machine2 etc.

What is wrong in my way of doing things?


-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/95d47b9a-0ed1-4091-ae3a-3e91cc3d900e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to