You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While executing a script to configure icinga apt repository, there was a error:
TASK [adfinis-sygroup.icinga2_agent : configure icinga apt repository] ********************************************************************************************************************************************
fatal: [example.host.com]: FAILED! => {"msg": "The conditional check '(ansible_lsb.id != 'Univention' or ansible_distribution_release != 'stretch')' failed. The error was: error while evaluating conditional ((ansible_lsb.id != 'Univention' or ansible_distribution_release != 'stretch')): 'dict object' has no attribute 'id'\n\nThe error appears to be in '/home/ahmarq/monitoring-plays/adfinis-roles/adfinis-sygroup.icinga2_agent/tasks/installation.yml': line 38, 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: configure icinga apt repository\n ^ here\n"}
Looks like the role blindly assumes an LSB system and ansible_lsb being populated. We should probably use Ansible's built-in OS detection mechanism instead (with ansible_facts.distribution or ansible_distribution).
ISSUE TYPE
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
While executing a script to configure icinga apt repository, there was a error:
Here is the line, which is located in the script:
The variable
ansible_lsb.id
does not exist on the affected system.STEPS TO REPRODUCE
Apply role for a debian-based system.
EXPECTED RESULTS
I expect that the script will run successfully.
ACTUAL RESULTS
I executed the script and it didn't do it's job.
The text was updated successfully, but these errors were encountered: