Icinga / ansible-playbooks

Ansible Playbook for Icinga 2
GNU General Public License v2.0
225 stars 122 forks source link

Prevent error when running in check mode #78

Closed maccadia closed 5 years ago

maccadia commented 6 years ago

In check mode, the error below is fired. This commit turn off the creation and display of installation token in check mode.

TASK [icinga2-ansible-web2-ui : Icinga Web2 Installation finished]
********************************************************************************************************************************************************************************************
fatal: [phi-monitoring-test]: FAILED! => {"msg": "The task
includes an option with an undefined variable. The error was: 'dict
object' has no attribute 'stdout'\n\nThe error appears to have been in
'/home/accadiam/ansible/roles/icinga2-ansible/icinga2-ansible-web2-ui/tasks/main.yml':
line 15, column 3, but may\nbe elsewhere in the file depending on the
exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name:
Icinga Web2 Installation finished\n  ^ here\n\nexception type: <class
'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has
no attribute 'stdout'"}
aflatto commented 6 years ago

@MAccadia does the other roles Conform tot he same behaviour ?

maccadia commented 6 years ago

What do you mean by "other roles". The icinga2-ansible-web2-ui is the only role with a token I am aware of.