How does --inventory option in Ansible work when it is given value with a trailing comma?

前端 未结 3 618
醉酒成梦
醉酒成梦 2020-12-11 20:16

Man pages for ansible and ansible-playbook define -i option as:

-i PATH, --inventory=PATH
       The PATH to the inve         


        
3条回答
  •  醉话见心
    2020-12-11 20:35

    According to Michael DeHann, who created Ansible, the comma trick you're referring to is a hack that shouldn't be relied upon. It's a hack to run Ansible without an inventory file, for cases where you're going to run against localhost. That way you don't actually have to create an inventory file that just lists localhost.

提交回复
热议问题