Skip to content

StepsServiceCommand

hellgate75 edited this page Mar 9, 2020 · 2 revisions

Go! Deploy logo

Go! Deploy

Service Command Structure Section

Service Command Step

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

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).

Navigate the site

Come back to the Steps Structure Section