Create an Ad Hoc Command

post

/api/v2/ad_hoc_commands/

Make a POST request to this resource with the following ad hoc command fields to create a new ad hoc command:

  • 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
Body ()
Root Schema : AdHocCommandList
Type: object
Show Source
Back to Top

Response

Supported Media Types

201 Response

Body ()
Root Schema : AdHocCommandList
Type: object
Show Source
Back to Top