
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
ansible-cli-js
Advanced tools
A node.js wrapper for the ansible command
Ansible must be installed and accessible in the path
npm install ansible-cli-js
Then:
var ansibleCli = require('ansible-cli-js');
With promise:
var Options = ansibleCli.Options;
var Ansible = ansibleCli.Ansible;
var options = new Options(
/* currentWorkingDirectory */ 'ping'
);
var ansible = new Ansible(options);
ansible.command('all -m ping --inventory-file=./inventory --connection=local').then(function (data) {
console.log('data = ', data);
});
//data = {
// command: 'ansible all -m ping --inventory-file=./inventory --connection=local ',
// raw: '["localhost | success >> {\\n \\"changed\\": false, \\n \\"ping\\": \\"pong\\"\\n}\\n\\n",""]'
//}
With callback:
ansible.command('ansible all -m ping --inventory-file=./inventory --connection=local', function (err, data) {
console.log('data = ', data);
});
Typescript:
import { Ansible, Options } from 'ansible-cli-js';
const options = new Options(
/* currentWorkingDirectory */ 'ping'
);
const ansible = new Ansible(options);
ansible.command('all -m ping --inventory-file ./inventory --connection local').then(function (data) {
console.log('data = ', util.inspect(data, { depth: 10 }));
});
MIT
FAQs
A node.js wrapper for the ansible command
The npm package ansible-cli-js receives a total of 7 weekly downloads. As such, ansible-cli-js popularity was classified as not popular.
We found that ansible-cli-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.