ansible-runner

use ansible-runner as Python module Interface to Ansible error: RunnerConfig' object has no attribute 'command'

use ansible-runner as Python module Interface to Ansible error: RunnerConfig' object has no attribute 'command' Question: I use ansible 2.9.13 and ansible-runner 1.4.6 Below is my Python code: from ansible_runner import Runner, RunnerConfig f = open(‘/home/george/dev/beeops/ansible_private/keyfile’, ‘r’) key = f.read() rc = RunnerConfig(private_data_dir=’/home/george/dev/beeops/ansible_private’, playbook=’test.yml’, inventory=’127.0.0.1′, ssh_key=key,) r = Runner(config=rc) r.run() An error occurred while I …

Total answers: 1

Ansible weird error : The error was: 'str object' has no attribute 'ip'

Ansible weird error : The error was: 'str object' has no attribute 'ip' Question: I have a very strange problem with an Ansible playbook. I use ansible with a Flask API, so I use ansible-runner to pass my variables to my playbook. My playbook is just a debug of my dictionary and its ip attribute: …

Total answers: 2

Running ansible-playbook using Python API

Running ansible-playbook using Python API Question: How can I run a playbook in python script? What is the equivalent of the following using ansible module in python: ansible -i hosts dbservers -m setup ansible-playbook -i hosts -vvvv -k site.yml I was looking at their documenation in http://docs.ansible.com/developing_api.html but they have very limited examples. Asked By: …

Total answers: 6