{"id":21721355,"url":"https://github.com/informaticsmatters/trigger-awx","last_synced_at":"2026-02-11T01:10:31.221Z","repository":{"id":80605435,"uuid":"245143017","full_name":"InformaticsMatters/trigger-awx","owner":"InformaticsMatters","description":"AWX Job execution utility based on the Tower CLI","archived":false,"fork":false,"pushed_at":"2026-01-30T12:32:44.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2026-01-31T05:36:16.961Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InformaticsMatters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-05T11:17:21.000Z","updated_at":"2026-01-30T12:32:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"131978bc-a4dd-4acb-a992-d46da9c15825","html_url":"https://github.com/InformaticsMatters/trigger-awx","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/InformaticsMatters/trigger-awx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Ftrigger-awx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Ftrigger-awx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Ftrigger-awx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Ftrigger-awx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InformaticsMatters","download_url":"https://codeload.github.com/InformaticsMatters/trigger-awx/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InformaticsMatters%2Ftrigger-awx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29323983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T00:34:26.354Z","status":"ssl_error","status_checked_at":"2026-02-11T00:34:09.494Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T02:16:00.160Z","updated_at":"2026-02-11T01:10:31.209Z","avatar_url":"https://github.com/InformaticsMatters.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# trigger-awx\n\n![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/informaticsmatters/trigger-awx)\n\n[![CodeFactor](https://www.codefactor.io/repository/github/informaticsmatters/trigger-awx/badge)](https://www.codefactor.io/repository/github/informaticsmatters/trigger-awx)\n\nA utility to trigger (execute) Job Templates on a designated AWX server\nusing the Ansible CLI. Version 1 of this utility is designed to be used\nthe [ansible-tower-cli] package. Version 2 is designed to be used with [awxkit]\n\n- `trigger-awx` is a simple trigger that just triggers a job that would\n  normally execute based on a new fixed tag, like `stable` or `latest`\n- `trigger-awx-tag` is used to provide a Job Template tag variable and value\n  so that Jobs can be run to deploy an image based on a specific tag.\n\n\u003e   Remember that Job Templates that you expect to run on AWX must be\n    executable by the user you provide.\n\n\u003e   Any AWX Job Template you execute should have the **PROMPT ON LAUNCH**\n    option selected in the **EXTRA VARIABLES** section. If not, variables\n    passed-in via the underlying tower-cli command will be ignored.\n\nThere are two trigger scripts `trigger-awx.sh` and `trigger-awx-tag.sh`. The\nformer is used to run named jobs and does not inject values into the playbook.\nIt's designed to be used to run jobs that rely on `latest` or `stable`\nbuilds or simply require re-execution to perform an action. It expects the\nfollowing environment variables, normally set via travis _Settings_: -\n\n-   `AWX_JOB_NAME`\n-   `AWX_HOST` (i.e. `https://example.com`)\n-   `AWX_USER`\n-   `AWX_USER_PASSWORD`\n\nThe latter expects the following variables and injects the given variable and value\ninto the named Job Template as EXTRA_VARIABLES. It is typically used to run jobs that\ndeploy a specific Docker image tag: -\n\n-   `AWX_HOST` (i.e. `https://example.com`)\n-   `AWX_USER`\n-   `AWX_USER_PASSWORD`\n\n\u003e   The latter is also easier to use from Travis to trigger more than\n    one Job Template. Refer to the individual scripts for details.\n\n\u003e   **CAUTION** The CI/CD examples here _clone_ this repository into the\n    root of the CI/CD workspace of your repository. Consequently, any files\n    in the root of your repository with a name that begins `trigger-` may\n    get over-written.\n\n## Use in .travis.yml\nTo make a Travis build trigger a Job Template on an AWX server, do two things:\n\n1.  Set appropriate environment variables as described in the\n    embedded documentation in the `trigger-awx.sh` script.\n    These can be defined in the Travis console for the project (refer to the\n    [Environment Variables] documentation on Travis).\n\n    You will need the AWX server URL, a job name and credentials for a user\n    that can execute the chosen job.\n\n2.  Add a `trigger awx` stage to your `.travis.yml` and then add the following:\n\n```yaml\nlanguage: python\npython:\n- '3.8'\n\nenv:\n  global:\n  # The tagged origin of the trigger code\n  # Always try and use the latest version of the trigger\n  - TRIGGER_ORIGIN=https://raw.githubusercontent.com/informaticsmatters/trigger-awx/2.0.0\n\ninstall:\n- curl --location --retry 3 ${TRIGGER_ORIGIN}/requirements.txt --output trigger-awx-requirements.txt\n- curl --location --retry 3 ${TRIGGER_ORIGIN}/trigger-awx.sh --output trigger-awx.sh\n- pip install -r trigger-awx-requirements.txt\n- chmod +x trigger-awx.sh\n\njobs:\n  include:\n  - stage: trigger awx\n    script: ./trigger-awx.sh\n```\n\n## Use in .gitlab-ci.yml\nTo make a GitLab CI build trigger a Job Template on an AWX server,\ndo two things:\n\n1.  Set appropriate environment variables, normally through the project's\n    CI/CD variables (refer to the [GitLab Variables] documentation).\n\n    You will need the AWX server URL, a job name and credentials for a user\n    that can execute the chosen job.\n\n2.  Add a `deploy` stage to your `.gitlab-ci.yml` and then add the following:\n\n```yaml\nvariables:\n  # The tagged origin of the trigger code\n  # Always try and use the latest version of the trigger\n  TRIGGER_ORIGIN: https://raw.githubusercontent.com/informaticsmatters/trigger-awx/2.0.0\n\n# If this is an official non-branch tag\n# (i.e. something like '1.0.0' without any pre-release qualifier)\n# then deploy to the production environment.\ndeploy_production:\n  stage: deploy\n  # 3.12.5 has a memory safety issue that can cause Black's AST safety checks to fail.\n  # 3.12.7 may interfere with the AWX trigger logic.\n  image: python:3.12.4\n  script:\n  - curl --location --retry 3 ${TRIGGER_ORIGIN}/requirements.txt --output trigger-awx-requirements.txt\n  - curl --location --retry 3 ${TRIGGER_ORIGIN}/trigger-awx-tag.sh --output trigger-awx-tag.sh\n  - pip install -r trigger-awx-requirements.txt\n  - chmod +x trigger-awx-tag.sh\n  - ./trigger-awx-tag.sh \"${CI_COMMIT_TAG}\" 1.0.0 Bother\n  environment:\n    name: production\n  only:\n  - /^([0-9]+\\.){1,2}[0-9]+$/\n  except:\n  - branches\n```\n\n---\n\n[ansible-tower-cli]: https://pypi.org/project/ansible-tower-cli/\n[awxkit]: https://pypi.org/project/awxkit/\n[environment variables]: https://docs.travis-ci.com/user/environment-variables/\n[gitlab variables]: https://docs.gitlab.com/ee/ci/variables/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformaticsmatters%2Ftrigger-awx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finformaticsmatters%2Ftrigger-awx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finformaticsmatters%2Ftrigger-awx/lists"}