diff --git a/lib/ansible.js b/lib/ansible.js index 4bb7e87..bc49384 100644 --- a/lib/ansible.js +++ b/lib/ansible.js @@ -243,6 +243,11 @@ var Playbook = function () { return this; } + this.file = function(file){ + this.config.file = file; + return this + } + this.variables = function(variables) { this.config.variables = variables; return this; @@ -288,6 +293,11 @@ var Playbook = function () { this.config.playbook + ".yml" ]; + if(this.config.file){ + let fileArg = this.config.file + result = result.concat('-e', fileArg) + } + if (this.config.variables) { var args = JSON.stringify(this.config.variables); result = result.concat('-e', args);