Code Monkey home page Code Monkey logo

action-trigger-awx's Introduction

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"

action-trigger-awx's People

Contributors

fitbeard avatar dependabot[bot] avatar lovingfox avatar ryantking avatar filipprosovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.