ansible
Description
Provides methods to manage Ansible systems
Namespace:
ansible
Method: createAnsiblePath
HTTP POST
Description:
Create ansible path
Parameters:
-
string sessionKey
-
struct props
-
string "type" - The ansible path type: 'inventory' or 'playbook'
-
int "server_id" - ID of control node server
-
string "path" - The local path to inventory/playbook
-
Returns:
-
* struct ansible path
-
int "path id"
-
string "type label"
-
int "id of the ansible control node system"
-
string "local path to inventory or playbook"
-
Method: discoverPlaybooks
HTTP POST
Description:
Discover playbooks under given playbook path with given pathId
Parameters:
-
string sessionKey
-
int pathId - path id
Returns:
-
struct playbooks
-
struct playbook
-
-
struct ansible path
-
int "path id"
-
string "type label"
-
int "id of the ansible control node system"
-
string "local path to inventory or playbook"
-
Method: fetchPlaybookContents
HTTP POST
Description:
Fetch the playbook content from the control node using a synchronous salt call.
Parameters:
-
string sessionKey
-
int pathId - playbook path id
-
string playbookRelPath - relative path of playbook (inside path specified by pathId)
Returns:
-
string contents - Text contents of the playbook
Method: introspectInventory
HTTP POST
Description:
Introspect inventory under given inventory path with given pathId and return it in a structured way
Parameters:
-
string sessionKey
-
int pathId - path id
Returns:
-
struct Inventory in a nested structure
-
object Inventory item - Inventory item (can be nested)
-
Method: listAnsiblePaths
HTTP GET
Description:
List ansible paths for server (control node)
Parameters:
-
string sessionKey
-
int controlNodeId - id of ansible control node server
Returns:
-
array :
-
struct ansible path
-
int "path id"
-
string "type label"
-
int "id of the ansible control node system"
-
string "local path to inventory or playbook"
-
Method: lookupAnsiblePathById
HTTP GET
Description:
Lookup ansible path by path id
Parameters:
-
string sessionKey
-
int pathId - path id
Returns:
-
* struct ansible path
-
int "path id"
-
string "type label"
-
int "id of the ansible control node system"
-
string "local path to inventory or playbook"
-
Method: removeAnsiblePath
HTTP POST
Description:
Create ansible path
Parameters:
-
string sessionKey
-
int pathId - path id
Returns:
-
int - 1 on success, exception thrown otherwise.
Method: schedulePlaybook
HTTP POST
Description:
Schedule a playbook execution
Parameters:
-
string sessionKey
-
string playbookPath
-
string inventoryPath - path to Ansible inventory or empty
-
int controlNodeId - system ID of the control node
-
dateTime.iso8601 earliestOccurrence - earliest the execution command can be sent to the control node. ignored when actionChainLabel is used
-
string actionChainLabel - label of an action chain to use, or None
Returns:
-
int id - ID of the playbook execution action created
Method: schedulePlaybook
HTTP POST
Description:
Schedule a playbook execution
Parameters:
-
string sessionKey
-
string playbookPath
-
string inventoryPath - path to Ansible inventory or empty
-
int controlNodeId - system ID of the control node
-
dateTime.iso8601 earliestOccurrence - earliest the execution command can be sent to the control node. ignored when actionChainLabel is used
-
string actionChainLabel - label of an action chain to use, or None
-
boolean testMode - 'true' if the playbook shall be executed in test mode
Returns:
-
int id - ID of the playbook execution action created
Method: schedulePlaybook
HTTP POST
Description:
Schedule a playbook execution
Parameters:
-
string sessionKey
-
string playbookPath
-
string inventoryPath - path to Ansible inventory or empty
-
int controlNodeId - system ID of the control node
-
dateTime.iso8601 earliestOccurrence - earliest the execution command can be sent to the control node. ignored when actionChainLabel is used
-
string actionChainLabel - label of an action chain to use, or None
-
struct ansibleArgs
-
boolean "flushCache"
-
Returns:
-
int id - ID of the playbook execution action created
Method: schedulePlaybook
HTTP POST
Description:
Schedule a playbook execution
Parameters:
-
string sessionKey
-
string playbookPath
-
string inventoryPath - path to Ansible inventory or empty
-
int controlNodeId - system ID of the control node
-
dateTime.iso8601 earliestOccurrence - earliest the execution command can be sent to the control node. ignored when actionChainLabel is used
-
string actionChainLabel - label of an action chain to use, or None
-
boolean testMode - 'true' if the playbook shall be executed in test mode
-
struct ansibleArgs
-
boolean "flushCache"
-
Returns:
-
int id - ID of the playbook execution action created
Method: updateAnsiblePath
HTTP POST
Description:
Create ansible path
Parameters:
-
string sessionKey
-
int pathId - path id
-
struct props
-
string "path" - The local path to inventory/playbook
-
Returns:
-
* struct ansible path
-
int "path id"
-
string "type label"
-
int "id of the ansible control node system"
-
string "local path to inventory or playbook"
-