Files
ansible-role-ubuntu_pro/tasks/validate_ubuntu_lts_version.yml
T

19 lines
601 B
YAML

---
- name: Gather LSB Facts
ansible.builtin.setup:
filter: lsb
- name: Assert that Host Operating System is Ubuntu
ansible.builtin.assert:
that:
- ansible_facts.lsb.id == 'Ubuntu'
fail_msg: 'Host Operating System is NOT Ubuntu'
success_msg: 'Host Operating System is Ubuntu'
- name: Assert that Host Operating System is an Ubuntu LSB Release
ansible.builtin.assert:
that:
- ansible_facts.lsb.release in ubuntu_pro_lts_releases
fail_msg: 'Host Operating System is NOT an Ubuntu LSB Release'
success_msg: 'Host Operating System is an Ubuntu LSB Release'