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

  • Learning DevOps
  • Mikael Krief
  • 169字
  • 2021-06-24 12:32:12

Increasing the log level output

In case of error, it is possible to add more logs during the output by adding the -v, -vvv, or -vvvv option to the Ansible command. 

The -v option enables the basic verbose mode, the -vvv option enables the verbose mode with more outputs, and the -vvvv option adds the verbose mode and the connection debugging information.

Executing the following command applies a playbook and will display more log information using the -v option that has been added:

ansible-playbook -i inventory playbook.yml -v

This can be useful for debugging in case of Ansible errors.

The complete documentation on the ansible-playbook command is available here:  https://docs.ansible.com/ansible/2.4/ansible-playbook.html.

We have just studied the execution of Ansible with its inventory and playbook by exploring some options that allow the following:

  • Previewing the changes that will be made by Ansible
  • Increasing the level of logs to make debugging easier

In the next section, we will talk about data security with the use of Ansible Vault.

主站蜘蛛池模板: 施甸县| 来凤县| 神木县| 辽源市| 东乡县| 观塘区| 南宫市| 板桥市| 芒康县| 邢台县| 饶河县| 雷州市| 红桥区| 枝江市| 平远县| 兴安盟| 安仁县| 玉溪市| 晴隆县| 基隆市| 攀枝花市| 甘洛县| 吴川市| 石棉县| 马公市| 禹州市| 方山县| 汕尾市| 昂仁县| 海伦市| 乌拉特前旗| 醴陵市| 平远县| 永登县| 金平| 斗六市| 无锡市| 张家口市| 郁南县| 旬阳县| 新河县|