发现在删掉 ~/.ssh/know_hosts 之后运行 ansible api 会出现以下提示 The authenticity of host '10.1.*.* (10.1.*.*)' can't be established. RSA key fingerprint is ::a5:c0:f8:4a:a2:d2:1a:ef::8f::f5:dd:4a. Are you sure you want to continue connecting (yes/no)? 因为在脚本里面自动运行调用…
Python API 2.0 从2.0的事情开始更复杂一些,但是你会得到更多离散和可读的类: #!/usr/bin/env python import json from collections import namedtuple from ansible.parsing.dataloader import DataLoader from ansible.vars import VariableManager from ansible.inventory import Inventory fro…