prioritizing .yaml file
Puppet Version - 3.7.5
Hello
I am trying to stop several services using puppet and Hiera yaml files using an array, the issue i got is the randomization. This causes an error for me where it won't stop a service as there is other services dependent on it. so here is the structure of my Hiera file:
server::services:
- 'WAS'
- 'DNS'
- 'IISADMIN'
- 'NetPipeActivator'
...
So when i run my puppet agent, it successfully cycles through each of the services and stops them but for some, it wants confirmation that we want that service and all associated services to end. I get this error:
The following services are dependent on the windows Process Activation
Service service. Stopping the Windows Process Activation Service service
will also stop these services.
Net.pipe Listener Adapter
Do you want to continue the operation? (Y/N)[N]:
No valid response was provided.
It then errors and skips that service and carries on with the rest. My first thought was to include Net.pipe service in my yaml file but above the WAS so it will stop it before stopping WAS. Puppet executes the list randomly each time though.
also here is my manifest file:
Class windows::services{
$windowsservices = [hiera_array('server::services')]
service {$windowsservices:
ensure => "stopped",
enable => manual,
}
}
Is there a way around this ? i was thinking of using ordering arrows '->'but as far as i know they cannot be used within an Hiera array.
Thanks in advance :)