Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Vars passed in the POST Data not working #12

Open
rahulonmars opened this issue Feb 18, 2020 · 0 comments
Open

Extra Vars passed in the POST Data not working #12

rahulonmars opened this issue Feb 18, 2020 · 0 comments

Comments

@rahulonmars
Copy link

rahulonmars commented Feb 18, 2020

Hi,

I am passing 1 extra variable in the post data:

  {
  	"extra_vars": [{
  		"arg_value": "172.17.14.xxx",
  		"arg_name": "inventory_hostname"
  	}],
  	"playbook_dir": "/data/",
  	"playbook": "pinger.yml",
  	"become": true
  }

URL : api/ansibleplaybook

The output that I'm getting is not taking this extra variable.

[WARNING]: Unable to parse /etc/ansible/hosts as an inventory source
 [WARNING]: No inventory was parsed, only implicit localhost is available
 [WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match 'all'

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [localhost]

TASK [test port 22 reachability on host localhost] *****************************
fatal: [localhost]: FAILED! => {"changed": false, "elapsed": 30, "msg": "localhost is not reachable on port 22"}
...ignoring

TASK [debug] *******************************************************************
ok: [localhost] => {
    "msg": {
        "changed": false,
        "elapsed": 30,
        "failed": true,
        "msg": "localhost is not reachable on port 22"
    }
}

PLAY RECAP *********************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=0   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant