"free_form" is a horrible doc artifact that I'm still unsure why it 
exists... It just means that the script/args go after the action name, eg:

- name: Configure data disk storage pool
  script: "configure_disks.ps1"
    creates: "C:/scripts/storagepool_configured.txt"

The script under the role's files directory is correct (and because of 
DWIM, you don't need to specify files/)- once you fix the task to point at 
the script in the expected way, it should work.

On Monday, June 13, 2016 at 8:59:28 AM UTC-7, Trond Hindenes wrote:
>
> Hi all, 
> I have a role where the file "configure_disks.ps1" is placed in folder 
> "files".
> From the role task I'm trying to run the "script" module using that file:
> - name: Configure data disk storage pool
>   script: 
>     free_form: "configure_disks.ps1" (I have also tried 
> "files/configure_disks.ps1")
>     creates: "C:/scripts/storagepool_configured.txt"
>
> Shouldn't this work? I can't seem to find exact documentation on when I 
> can use the "files" folder and when I can't. 
>
> Failing that, I guess I can copy the script out to nodes first, but that 
> means I'm unable to use the script module since that expects a source file 
> existing on the control node, right?
>
> I haven't used the "script" module much, so any pointers would be great. 
>

-- 
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/076f4ee4-04ac-42fc-ae7c-4e3cecea8b4f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to