如何使用Python调用Ansible Playbook - 简书
https://www.jianshu.com/p/1be8097107d110.12.2019 · 一个基本的ansible-playbook api调用:. from collections import namedtuple from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory from ansible.executor.playbook_executor import PlaybookExecutor loader = DataLoader() variable_manager = VariableManager() inventory ...