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

Configuring Ansible

By default, the Ansible configuration is in the /etc/ansible/ansible.cfg file that is created during the installation of Ansible. This file contains several configuration keys, such as an SSL connection, a user, a protocol, transport, and many others.

This file is created by default during the installation of Ansible and, to guide the user to get started, initial content is placed in it. This content contains a multitude of configuration keys that are commented out so that they are not applied by Ansible but can be activated at any time by the user.

The following screenshot shows an extract from this /etc/ansible/ansible.cfg configuration file with some keys in comment with the # symbol:

If we want to change the default Ansible configuration, we can modify this file.

For more details about all Ansible configuration keys, see the official documentation:  https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings.

We can also view and modify this configuration using the ansible-config command. For example, for displaying the Ansible configuration file, execute the following command:

ansible-config view

The following screenshot shows the execution of this command:

In this section, we have seen how to install Ansible and then we have explored some of Ansible's artifacts. Finally, we saw different ways to configure Ansible.

In the next section, we will detail a static Ansible inventory and how to create it for targeting hosts.

主站蜘蛛池模板: 高邑县| 中阳县| 德兴市| 金湖县| 永城市| 东兰县| 沈丘县| 东源县| 洛阳市| 洛阳市| 宁都县| 沈丘县| 准格尔旗| 姜堰市| 江都市| 长子县| 岐山县| 崇州市| 安图县| 沙湾县| 宾阳县| 府谷县| 治县。| 南和县| 阳春市| 霸州市| 盐津县| 集安市| 柳州市| 开原市| 遂宁市| 体育| 秭归县| 阿克苏市| 义乌市| 泸溪县| 门源| 长阳| 樟树市| 富顺县| 安康市|