You cannot. Each win_dsc task is an adhoc implementation of a DSC resource 
and they have no idea about other DSC tasks you may have invoked. Ansible 
tasks are run sequentially so running 2 DSC tasks after each other will 
ensure both are run and the 2nd is dependent on the first. If you wish to 
skip tasks use the when condition on the Ansible task itself.

On Sunday, August 22, 2021 at 2:17:55 AM UTC+10 [email protected] wrote:

> Anyone got any ideas on this? 
>
> lördag 7 augusti 2021 kl. 16:13:47 UTC+2 skrev [email protected]:
>
>> Hello!
>>
>> I'm trying to figure out how I can write dependsOn with the win_dsc 
>> module. As far as I understand it, the dsc configuration itself isn't 
>> started with a name, see 
>> https://github.com/ansible-collections/ansible.windows/blob/bf3fbf8ac02241c9e7e4f2111edb642e4d8555ad/plugins/modules/win_dsc.ps1#L456
>> .
>>
>> This makes it so I cannot reference the configuration name for DependsOn 
>> parameter, 
>> https://docs.microsoft.com/en-us/powershell/scripting/dsc/configurations/resource-depends-on?view=powershell-7.1
>> .
>>
>> Is there anyone who knows how this works in Ansible?
>>
>> Best regards
>> Tony
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9ea1a396-72c9-4d1c-8116-70807af0eda1n%40googlegroups.com.

Reply via email to