Git Product home page Git Product logo

ansibleawx-client's Introduction

Ansible AWX Client

Donate to help keep this project maintained

Donate with PayPal button

Summary

This is a unofficial python API client for Ansible AWX.

Requirements

  • requests

Quick Start Guide

Install Ansible AWX Client

pip install ansibleawx-client

Initialize API Client

You can do this with your username and password or using your Token.

Initialize client with your username and password

import ansibleawx

API_URL = "http://my-ansibleawx.com/api/v2"

client = ansibleawx.Api("username", "password", api_url=API_URL)

Initialize client with your token

import ansibleawx

API_URL = "http://my-ansibleawx.com/api/v2"
TOKEN = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"

client = ansibleawx.Api(api_url=API_URL, token=TOKEN)

Examples

Get Inventories

# to get all inventories
response = client.get_inventories()

# to get specific inventory by id
response = client.get_inventories(1)

Get Jobs Templates

# to get all jobs templates
response = client.get_jobs_templates()

# to get specific job template by id
response = client.get_jobs_templates(1)

Launch Job Template by id

response = client.launch_job_template(1)

Relaunch Job by id

response = client.relaunch_job(1)

Cancel Job by id

response = client.cancel_job(1)

Function Reference

Consult the Ansible Tower documentation for more details.

ansibleawx-client's People

Contributors

mdiniz97 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.