Skip to content
Snippets Groups Projects
Commit d56dc340 authored by Michał Nasiadka's avatar Michał Nasiadka Committed by Radosław Piliszek
Browse files

Validate if running CentOS OS is CentOS Stream

Change-Id: I2fe738249018e25e79fd726bc931be6b7bd91934
parent c0540760
No related branches found
No related tags found
No related merge requests found
...@@ -17,3 +17,18 @@ ...@@ -17,3 +17,18 @@
- ansible_facts.distribution_release not in host_os_distributions[ansible_facts.distribution] - ansible_facts.distribution_release not in host_os_distributions[ansible_facts.distribution]
- ansible_facts.distribution_version not in host_os_distributions[ansible_facts.distribution] - ansible_facts.distribution_version not in host_os_distributions[ansible_facts.distribution]
- ansible_facts.distribution_major_version not in host_os_distributions[ansible_facts.distribution] - ansible_facts.distribution_major_version not in host_os_distributions[ansible_facts.distribution]
- name: Checking if CentOS is Stream
become: true
command: grep -q Stream /etc/os-release
register: stream_status
changed_when: false
when:
- ansible_facts.distribution == 'CentOS'
- name: Fail if not running on CentOS Stream
fail:
msg: CentOS Linux is not supported, you need to run CentOS Stream.
when:
- ansible_facts.distribution == 'CentOS'
- stream_status.rc != 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment