You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

knode-awx

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

knode-awx

AWX (Ansible) interface with nodejs


Version published
Maintainers
1
Created

Readme

Source

node-awx

AWX Api Interface for nodejs

Implementations list

  • Inventory
    • Get
    • List
  • Job Template
    • Get
    • List
  • Job
    • Get
    • List
    • isFinished
    • wait(ms) : Wait for the job to finish (Sucessfull, Error, Failed, ...)

Usage

import AnsibleApi from "../src/index.js";
import {JobTemplate} from "../src/Api/Endpoint/Job/JobTemplate.js";
import {Inventory} from "../src/Api/Endpoint/Inventory/Inventory.js";

const AApi = new AnsibleApi("https://localhost:8043/api/v2/", {token: "TOKEN"});

const job = await (await JobTemplate.get(7)).launch()
const inventory = await Inventory.get(1)

console.log(inventory.inventory)
console.log(await job.isFinished())

Run Test

// desactivate TLS REJECT FOR LOCALHOST TEST 
export NODE_TLS_REJECT_UNAUTHORIZED=0
// AWX URL default value : http://localhost:8043
$ export AWX_TOKEN="TOKEN_AWX"; npm run test
// or
$ export AWX_TOKEN="TOKEN_AWX"; export AWX_URL="https://url.com"; npm run test

FAQs

Package last updated on 04 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc