Right now we are using all the vars.systemd array for creating multiple service for the systemd check BUT,
we also need to have some other service added for let say, nginx and apache, and I would like to simplify my host.variables to re-use the the same systemd array.
Right now we have:
apply Service for (service_name => config in host.vars.systemd) {
...
assign where host.vars.os == "Linux" && host.vars.systemd != null
}
And I have:
apply Service "Service [nGinx]" {
...
assign where host.vars.os == "Linux" && host.vars.nginx == true
}
but I would like to remove the host.vars.nginx and re-use the systemd array but JUST for this service…
something like
assign where host.vars.os == "Linux" && host.vars.systemd.name == "nginx"