Create an Ad Hoc Command for a Host
post
/api/v2/hosts/{id}/ad_hoc_commands/
Make a POST request to this resource with the following ad hoc command fields to create a new ad hoc command associated with this host.
-
execution_environment
: The container image to be used for execution. (id, default=``) -
job_type
: (choice)run
: Run (default)check
: Check
inventory
: (id, default=``)limit
: (string, default=""
)credential
: (id, default=``)module_name
: (choice)command
(default)shell
yum
apt
apt_key
apt_repository
apt_rpm
service
group
user
mount
ping
selinux
setup
win_ping
win_service
win_updates
win_group
win_user
module_args
: (string, default=""
)forks
: (integer, default=0
)verbosity
: (choice)0
: 0 (Normal) (default)1
: 1 (Verbose)2
: 2 (More Verbose)3
: 3 (Debug)4
: 4 (Connection Debug)5
: 5 (WinRM Debug)
extra_vars
: (string, default=""
)become_enabled
: (boolean, default=False
)diff_mode
: (boolean, default=False
)
Request
Supported Media Types
- application/json
Path Parameters
Root Schema : schema
Type:
Show Source
object
-
become_enabled:
boolean
-
credential:
integer
-
diff_mode:
boolean
-
execution_environment:
integer
The container image to be used for execution.
-
extra_vars:
string
-
forks:
integer
-
inventory:
integer
-
job_type:
string
-
limit:
string
-
module_args:
string
-
module_name:
string
-
verbosity:
string