Ansible无法识别配置中的默认库存集

Ansible无法识别配置中的默认库存集,ansible,Ansible,如果我明确指定,我可以使用我的Ansible清单文件ping所有主机: ansible -i mmp_default/mmp_static_default all -m ping mmp-websockets002.prod01.company.com | SUCCESS => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed":

如果我明确指定,我可以使用我的Ansible清单文件ping所有主机:

ansible -i mmp_default/mmp_static_default  all -m ping

mmp-websockets002.prod01.company.com | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
}
mmp-staticweb001.prod01.company.com | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python"
    },
    "changed": false,
    "ping": "pong"
但在我的配置中将其设置为默认库存不起作用:

ansible all -m ping
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
这是我的配置:

sudo cat /etc/ansible/ansible.cfg
[defaults]
ansible_managed = This file is managed by Merlin. Do not edit directly.
deprecation_warnings = False
timeout=30
remote_user = centos
private_key_file = /home/centos/AWS.pem

[privilege_escalation]
become=True
become_user=root

[inventory]
## enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini'
enable_plugins = auto, ini
inventory = /home/centos/R2.4.1/merlin/mmp_default/mmp_static_default
我的清单列为:
inventory=/home/centos/R2.4.1/merlin/mmp\u default/mmp\u static\u default

为什么ansible无法识别我在配置中设置的库存文件?

From,
库存设置应位于默认值部分:

[defaults]
...
inventory = /home/centos/R2.4.1/merlin/mmp_default/mmp_static_default
...

[privilege_escalation]
....

尝试将清单文件从
清单
部分定义为
默认值
部分