-
Notifications
You must be signed in to change notification settings - Fork 4
Detfile Environment
Micah J. Martin edited this page Apr 16, 2019
·
2 revisions
Your detfile must contain an env
that is a dictionary. This environment allows you to specify several needed and optional values that control how detcord will operate.
A basic env
will look similar to this:
env = {}
env['hosts'] = ['192.168.1.2', '192.168.1.3']
env['user'] = 'root'
env['pass'] = 'toor'
The env
however is capable of supporting many different options outlined below.
-
hosts
required - An array of hosts to run the actions against. -
user
required - The default username to use on each host. -
pass
required - The default password to use on each host. -
threading
optional - Whether or not to thread the actions. Each host gets one thread. -
silent
optional - Whether or not to allow actions to print.
You may set 'silent' in the env
to prevent actions from printing to stdout and stderr. To get the output of the detcord actions, implement the on_detcord_action
callback.
env['silent'] = True