Sorry, also forgot the args wrapper:

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

On Monday, June 13, 2016 at 10:30:44 AM UTC-7, Matt Davis wrote:
>
> "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/ae0816fe-3e0a-4c6b-8f0e-5debf88b5814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to