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

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.

主站蜘蛛池模板: 连江县| 炎陵县| 永川市| 阿克苏市| 邢台市| 文成县| 承德市| 息烽县| 济源市| 五台县| 日喀则市| 郸城县| 潞城市| 拉萨市| 新安县| 克什克腾旗| 淮南市| 阿瓦提县| 北海市| 河津市| 浪卡子县| 怀柔区| 当涂县| 定安县| 丰镇市| 孟津县| 彭州市| 广西| 桦川县| 祁东县| 宁夏| 淮阳县| 马龙县| 清涧县| 延边| 邢台县| 疏附县| 张北县| 怀柔区| 定结县| 东阿县|