Open ahmarq opened 1 year ago
Hey, thanks for reporting this issue!
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
).
Something like this could work:
state: present
when:
- ansible_os_family == 'Debian'
- - (ansible_lsb.id != 'Univention' or ansible_distribution_release != 'stretch')
+ - (ansible_distribution != 'Univention' or ansible_distribution_release != 'stretch')
notify: update package repository
But we'd need to test this on Univention systems.
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.