mirror of
https://github.com/rssnyder/drone-plugin-awx
synced 2026-09-11 01:10:27 -05:00
No description
- Python 98.6%
- Dockerfile 1.4%
| .gitignore | ||
| Dockerfile | ||
| plugin.py | ||
| README.md | ||
| requirements.txt | ||
drone-plugin-awx
triggers awx jobs from harness
settings
ENDPOINT- awx endpoint (str)USERNAME- awx username (str: required unlessTOKENis set)PASSWORD- awx password (str: required unlessTOKENis set)TOKEN- (optional) existing oauth/personal access token; if set,USERNAME/PASSWORDare not required and no token is requestedAPI_PATH- (optional) api base path (str: defaultapi/v2; useapi/controller/v2for AAP Platform Gateway deployments)SAVE_TOKEN- (optional) set awx token as step output (only when authenticating withUSERNAME/PASSWORD)TARGET_HOSTNAME- (optional) target hostname (str)TARGET_DESC- (optional) target description (str)ADD_TO_INVENTORY- (optional) add target to inventory (bool: default false)IGNORE_EXISTING_HOST- (optional) ignore if host already exists in inventory (bool: default false)INVENTORY_ID- (optional) inventory id, if not provided, will be created dynamically (int)INVENTORY_NAME- (optional) inventory name for dynamic inventory (str)INVENTORY_DESC- (optional) inventory description for dynamic inventory (str)ORGANIZATION_ID- (optional) awx organization for dynamic inventory (int: default 1)JOB_TEMPLATE_ID- (optional) job template id (int)EXTRA_VARS- (optional) extra vars for job (json string)LIMIT- (optional) limit pattern for job execution (str)
outputs
AWX_TOKEN- awx token (str: ifSAVE_TOKENis true)INVENTORY_ID- inventory id (int: if inventory is created)JOB_ID- job id (int: if job is triggered)JOB_STATUS- job status (str: if job is triggered)JOB_URL- job url (str: if job is triggered)
usage
- step:
type: Plugin
name: awx
identifier: awx
spec:
connectorRef: account.buildfarm_container_registry_cloud
image: harnesscommunity/drone-plugin-awx
settings:
endpoint: http://awx.r.ss
username: admin
password: <+secrets.getValue("lab")>
save_token: "true"
target_hostname: home.r.ss
job_template_id: "7"
Ansible Automation Platform (Platform Gateway)
Newer AAP deployments front the controller with a Platform Gateway, which exposes
controller endpoints under /api/controller/v2/ instead of /api/v2/. Set API_PATH
accordingly, and optionally supply an existing token to skip the /tokens/ endpoint:
- step:
type: Plugin
name: awx
identifier: awx
spec:
image: harnesscommunity/drone-plugin-awx
settings:
endpoint: https://aap.example.com
api_path: api/controller/v2
token: <+secrets.getValue("aap_token")>
job_template_id: "12"
inventory_id: "5"
add_to_inventory: "true"
ignore_existing_host: "true"