【问题标题】:Failed to run ansible playbook with gather_facts true无法使用gather_facts true运行ansible playbook
【发布时间】:2019-01-16 06:14:58
【问题描述】:

如果我将gather_facts 设置为true,我的ansible playbook 将会失败。 即使我执行 ansible-cmdb ,我也会遇到同样的问题。

完整的回溯是:

WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_setup_payload_ccUPIO/ansible_setup_payload.zip/ansible/module_utils/basic.py", line 2848, in run_command
    cmd = subprocess.Popen(args, **kwargs)
  File "/usr/lib64/python2.6/subprocess.py", line 642, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1238, in _execute_child
    raise child_exception

QA_SILVER_MANUAL_LARGE(19.01GA_repo)_IDM | FAILED! => {
    "changed": false, 
    "cmd": "/usr/bin/facter --puppet --json", 
    "invocation": {
        "module_args": {
            "fact_path": "/etc/ansible/facts.d", 
            "filter": "*", 
            "gather_subset": [
                "all"
            ], 
            "gather_timeout": 10
        }
    }, 
    "msg": "[Errno 13] Permission denied", 
    "rc": 13
}

这是我的 ansible 版本信息:

bash-4.2# ansible --version
ansible 2.7.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/usr/lib/python2.7/site-packages/ara/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug 31 2018, 05:35:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36.0.1)]

你能帮我解决这个问题吗?

【问题讨论】:

    标签: ansible


    【解决方案1】:

    您可能需要仔细检查您的安装。警告说:

    文件“/usr/lib64/python2.6/subprocess.py”

    ansible --version 报告:

    python 版本 = 2.7.5

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-02-19
      • 2021-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多