我想在Python中运行Ansible而不通过(ANSIBLE_HOST)指定库存文件,但只是通过:
ansible.run.Runner( module_name='ping', host='www.google.com' )
我实际上可以轻松地在Fabric中执行此操作,但只是想知道如何在Python中执行此操作.另一方面,用于python的Ansible API的文档并不完整.
python ansible
ansible ×1
python ×1