python ansible runner; result return in python

60 views
Skip to first unread message

soonyu

unread,
Feb 28, 2022, 9:47:40 AM2/28/22
to Ansible Project
from python I using ansible runner to call ansible

    playbookvar = '/home/vagrant/projectrole/test.yaml'
    r=ansible_runner.run(inventory = inv , playbook =playbookvar )
any possible get return value from ansible to python ?


result of python
ASK [return] ***************************************************************************************************************
ok: [localhost] => {
    "returnvalue": [
        {
            "result": "1",
            "server": "test1"
        },
        {
            "result": "1",
            "server": "test2"
        }
    ]
}

thanks
soonyu
Reply all
Reply to author
Forward
0 new messages