Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play-circle

GitHub Action

Trigger AWX and Ansible Automation Platform Controller resources

v22.7.0

Trigger AWX and Ansible Automation Platform Controller resources

play-circle

Trigger AWX and Ansible Automation Platform Controller resources

Trigger resource on AWX or Ansible Automation Platform Controller

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Trigger AWX and Ansible Automation Platform Controller resources

uses: fitbeard/[email protected]

Learn more about this action in fitbeard/action-trigger-awx

Choose a version

Github action for AWX and Ansible Tower resource triggering

main

This Github action aims to interact with AWX or Tower servers.

It connects to an AWX or Tower server and launches a job or workflow_job template or updates project.

Note

For best compatibility and if it possible always use the identical version of this action to your installed AWX version.

Usage

See action.yml

Exaples

  awx-examples:
    runs-on: ubuntu-latest
    steps:
      - name: "Test AWX: Simple job template"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: job_template
          resource_name: actions-awxkit-test

      - name: "Test AWX: Simple job template - specify credentials"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: job_template
          resource_name: actions-awxkit-test
          credentials: "test-credential"

      - name: "Test AWX: Simple workflow template"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: workflow_job_template
          resource_name: actions-awxkit-workflow-test

      - name: "Test AWX: Project update"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: project
          resource_name: ansible-project

      - name: "Test AWX: Inventory Source update"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: inventory_source
          resource_name: inventory-source-name

      - name: "Test AWX: Random options job template 1"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: job_template
          resource_name: actions-awxkit-test3
          limit: "localhost-0*"
          extra_vars: '{"test": 1, "test2": "this variable"}'
          timeout: 300

      - name: "Test AWX: Random options job template 2"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: job_template
          resource_name: actions-awxkit-test3
          limit: "localhost-0*"
          extra_vars: '{"test": 1, "test2": "this variable"}'
          branch: "test/awxkit_action_poc"
          inventory: localhost-awxkit-test
          tags: "1,two,o_0"
          skip_tags: "nonsense"

      - name: "Test AWX: Simple job template without waiting"
        uses: fitbeard/[email protected]
        with:
          tower_url: ${{ secrets.TOWER_HOST }}
          tower_token: ${{ secrets.TOWER_OAUTH_TOKEN }}
          resource_type: job_template
          resource_name: actions-awxkit-test2
          monitor: "false"