ansible-playbook-cli-js
A node.js wrapper for the ansible-playbook command
Installation
Step 1: Prerequisites
Ansible must be installed and accessible in the path
Step 2: Installation
npm install ansible-playbook-cli-js
Then:
var ansiblePlaybookCli = ;
Usage
With promise
var Options = ansiblePlaybookCliOptions;var AnsiblePlaybook = ansiblePlaybookCliAnsiblePlaybook; var options = /* currentWorkingDirectory */ 'test'; var ansiblePlaybook = options; ansiblePlaybook; //data = {// command: 'ansible-playbook playbook.yml -i hosts ',// raw: '\\nPLAY [create test dir] ******************************************************** \\n\\nGATHERING FACTS *************************************************************** \\nok: [127.0.0.1]\\n\\nTASK: [create tmp2 dir] ******************************************************* \\nok: [127.0.0.1]\\n\\nPLAY RECAP ******************************************************************** \\n127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0 \\n\\n',// lines:// ['',// 'PLAY [create test dir] ******************************************************** ',// '',// 'GATHERING FACTS *************************************************************** ',// 'ok: [127.0.0.1]',// '',// 'TASK: [create tmp2 dir] ******************************************************* ',// 'ok: [127.0.0.1]',// '',// 'PLAY RECAP ******************************************************************** ',// '127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0 ',// '',// ''],// object: { host: '127.0.0.1', ok: 2, changed: 0, unreachable: 0, failed: 0 }//}
With callback:
ansiblePlaybook;
Typescript:
; const options = /* currentWorkingDirectory */ 'test'; const ansiblePlaybook = options; ansiblePlaybook;
License
MIT