-
Notifications
You must be signed in to change notification settings - Fork 0
StepsShellCommand

Shell Command Structure Section
Shell command allows to execute remote shell commands, based on specific request on target OS default user shell.
Here command syntax sample:
- name: My Shell Comand, iterating for a list of input items
shell:
exec: echo "{{ MyVarName1 }}-{{ MyVarName2 }}-{{ item }}" > ~/my-access-file.log
runAs: gouser #not implemented yet
asRoot: false #not implemented yet
withVars:
- MyVarName1
- MyVarName2
withList:
- Michael White
- Joseph Green
- John Red
Here we have a spool shell command on a file with the content of the 2 valiables, iterated for the {{ item }} from the provided list, all contatenated ad replaced before the command is executed. Totally we will have 3 noew rows in the file.
Another useful case is :
- name: My Shell Comand, iterating for a list of input items
shell:
exec: cat ~/{{ MyVarName1 }}-{{ MyVarName2 }}-all.log
runAs: gouser #not implemented yet
asRoot: false #not implemented yet
withVars:
- MyVarName1
- MyVarName2
saveState: myNewSessionVariable
In this case differently the output is used to collect data in a variable, raw dara, used in future for other operations.
We will allow, in a near future, the creation of a grouped by report and host using all session states, required by the user, via template file.
Use cases for this command are related to the interaction with the the target operating system, and in the details with the default shell.
We will provide soon a switcher to chose one session on the top of others, accordingly to the final O/S.
Come back to the Steps Structure Section