Add 'Ubuntu LTS Release validation'

This commit is contained in:
Sebastien Thebert committed 2022-10-11 16:08:26 +02:00
1 parent 651e52d194
commit 6b1e5bb9bd
4 files changed
+30 -4

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
---
- 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'