Where to store Ansible host file on Mac OS X

后端 未结 6 1263
暗喜
暗喜 2021-01-29 23:12

I am trying to get started with Ansible to provision my Vagrantbox, but I can’t figure out how to deal with host files.

According to the documentation the should be stor

6条回答
  •  隐瞒了意图╮
    2021-01-30 00:07

    I like to use bash environment variables as my base project is shared with other users. you can simply export ANSIBLE_HOSTS=/pathTo/inventory/ this can be a host file or a directory with multi files.

    You can also use write it in your ~/.bash_profile so its persistent A bunch of other variables can set that way instead of maintaining a conf file for more info check the source in ansible/lib/ansible/constants.py

提交回复
热议问题