官术网_书友最值得收藏!

Ansible version and configuration

It is assumed that you have Ansible installed on your system. There are many documents out there that cover installing Ansible in a way that is appropriate for the operating system and version that you might be using. This book will assume the use of the Ansible 2.2.x.x version. To discover the version in use on a system with Ansible already installed, make use of the version argument, that is, either ansible or ansible-playbook:

Note

Note that ansible is the executable for doing adhoc one-task executions and ansible-playbook is the executable that will process playbooks for orchestrating many tasks.

The configuration for Ansible can exist in a few different locations, where the first file found will be used. The search order changed slightly in version 1.5, with the new order being:

  • ANSIBLE_CFG: This is an environment variable
  • ~/ansible.cfg: This is in the current directory
  • ansible.cfg: This is in the user's home directory 
  • ./etc/ansible/ansible.cfg

Some installation methods may include placing a config file in one of these locations. Look around to check whether such a file exists and see what settings are in the file to get an idea of how Ansible operation may be affected. This book will assume no settings in the ansible.cfg file that would affect the default operation of Ansible.

主站蜘蛛池模板: 龙岩市| 嘉义市| 睢宁县| 恩平市| 即墨市| 阿坝| 台南县| 扶沟县| 大庆市| 同仁县| 繁昌县| 洱源县| 塔河县| 辉县市| 兴仁县| 东兰县| 襄垣县| 鹤峰县| 吉木萨尔县| 团风县| 叶城县| 辽宁省| 来安县| 铁岭县| 内丘县| 卢湾区| 家居| 且末县| 临湘市| 西华县| 上饶市| 阿荣旗| 咸阳市| 沙河市| 阳泉市| 鲜城| 连南| 密云县| 星子县| 抚顺县| 喜德县|