-
Notifications
You must be signed in to change notification settings - Fork 0
StepsServiceCommand
Service Command Structure Section
State command allows to execute state change of services, based on the host O/S shell language and service manager implementation.
Here command syntax sample:
- name: My Service state change
service:
name: {{ MyVarName1 }}-{{ MyVarName2 }}-service
state: {{ item }}
withVars:
- MyVarName1
- MyVarName2
withList:
- restart
- stop
- start
- stop
- delete
Here we have a service state change of the sarvice identified using 2 valiables, iterated for the states {{ item }} in the provided list. The service state is intended as root. Use of iterator value is not limited in the number of available states, as required, just in the logic of the service state.
Use cases for this command are related to the state change, due to an installation or update of a specific service, into the host operating system.
We will provide soon a switcher to chose one user but the root access request (current implementation).
Come back to the Steps Structure Section