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

  • 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.

主站蜘蛛池模板: 永川市| 阿坝县| 丰原市| 盐边县| 绥中县| 平原县| 屏东市| 兴和县| 清镇市| 平度市| 通州市| 集贤县| 花莲市| 五台县| 江永县| 旅游| 吉安市| 色达县| 镇巴县| 长治县| 余江县| 湘阴县| 临潭县| 达孜县| 黄龙县| 伊宁县| 宁乡县| 陇川县| 丁青县| 翁牛特旗| 夏津县| 舟曲县| 新邵县| 冕宁县| 包头市| 平罗县| 延川县| 阿拉善盟| 杂多县| 来凤县| 高陵县|