{"id":16480556,"url":"https://github.com/quobject/ansible-cli-js","last_synced_at":"2025-10-27T17:30:41.208Z","repository":{"id":47984198,"uuid":"43665446","full_name":"Quobject/ansible-cli-js","owner":"Quobject","description":"A node.js wrapper for the ansible command","archived":false,"fork":false,"pushed_at":"2021-08-11T07:36:36.000Z","size":35,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-11T13:04:23.464Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quobject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-05T04:37:26.000Z","updated_at":"2020-01-10T22:43:35.000Z","dependencies_parsed_at":"2022-08-12T15:52:05.520Z","dependency_job_id":null,"html_url":"https://github.com/Quobject/ansible-cli-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quobject%2Fansible-cli-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quobject%2Fansible-cli-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quobject%2Fansible-cli-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quobject%2Fansible-cli-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quobject","download_url":"https://codeload.github.com/Quobject/ansible-cli-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219860931,"owners_count":16556009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T13:04:29.801Z","updated_at":"2025-10-27T17:30:40.859Z","avatar_url":"https://github.com/Quobject.png","language":"TypeScript","readme":"# ansible-cli-js\nA node.js wrapper for the [ansible](http://linux.die.net/man/1/ansible) command\n\n[![NPM](https://nodei.co/npm/ansible-cli-js.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/ansible-cli-js/)\n[![NPM](https://nodei.co/npm-dl/ansible-cli-js.png?months=6\u0026height=3)](https://nodei.co/npm/ansible-cli-js/)\n\n[![NPM version][npm-image]][npm-url]\n[![NPM downloads][downloads-image]][downloads-url]\n\n## Installation\n\n### Step 1: Prerequisites\n\n[Ansible](http://www.ansible.com/) must be installed and accessible in the path\n\n### Step 2: Installation\n    \n    npm install ansible-cli-js\n    \nThen:\n\n```js\nvar ansibleCli = require('ansible-cli-js');\n\n```\n\n## Usage\n\nWith promise:\n\n```js\nvar Options = ansibleCli.Options;\nvar Ansible = ansibleCli.Ansible;\n\nvar options = new Options(\n    /* currentWorkingDirectory */ 'ping'\n);\n\nvar ansible = new Ansible(options);\n\nansible.command('all -m ping  --inventory-file=./inventory --connection=local').then(function (data) {\n  console.log('data = ', data); \n});\n\n//data = {\n//  command: 'ansible all -m ping --inventory-file=./inventory --connection=local ',\n//  raw: '[\"localhost | success \u003e\u003e {\\\\n    \\\\\"changed\\\\\": false, \\\\n    \\\\\"ping\\\\\": \\\\\"pong\\\\\"\\\\n}\\\\n\\\\n\",\"\"]'\n//}\n```\n\nWith callback:\n\n```js\n\nansible.command('ansible all -m ping --inventory-file=./inventory --connection=local', function (err, data) {\n  console.log('data = ', data);\n});\n\n```\n\n\nTypescript:\n\n```js\nimport { Ansible, Options } from 'ansible-cli-js';\n\nconst options = new Options(\n  /* currentWorkingDirectory */ 'ping'\n);\n\nconst ansible = new Ansible(options);\n\nansible.command('all -m ping --inventory-file ./inventory --connection local').then(function (data) {\n  console.log('data = ', util.inspect(data, { depth: 10 }));\n});\n\n```\n\n## License\n\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/ansible-cli-js.svg?style=flat\n[npm-url]: https://npmjs.org/package/ansible-cli-js\n[downloads-image]: https://img.shields.io/npm/dm/ansible-cli-js.svg?style=flat\n[downloads-url]: https://npmjs.org/package/ansible-cli-js\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquobject%2Fansible-cli-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquobject%2Fansible-cli-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquobject%2Fansible-cli-js/lists"}