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

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.

主站蜘蛛池模板: 师宗县| 尼玛县| 江达县| 宣汉县| 启东市| 长顺县| 康乐县| 嘉峪关市| 瓦房店市| 清水河县| 友谊县| 凉城县| 龙岩市| 巫山县| 盈江县| 开原市| 界首市| 玉环县| 林州市| 衡东县| 禹州市| 无为县| 宜阳县| 湘阴县| 苏尼特右旗| 武穴市| 颍上县| 乌兰县| 万年县| 沭阳县| 蓝田县| 灵川县| 杭锦旗| 青川县| 突泉县| 文昌市| 特克斯县| 滁州市| 班玛县| 汝阳县| 辛集市|