Skip to content

Commit

Permalink
prechecks: fix check that we run on RHEL >= 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mbukatov committed Sep 12, 2017
1 parent 18e5693 commit f17b987
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion prechecks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@
# become: yes
tasks:

# example of the transforamtion: "7.10.123" -> "10"
- name: Extract minor version number from full ansible_distribution_version
set_fact:
distribution_minor_version: "{{ ansible_distribution_version|regex_replace('[0-9]\\.([0-9]+).*', '\\1') }}"

- name: Check that we run on CentOS or Red Hat Enterprise Linux >= 7.3
assert:
that:
- ansible_distribution == "CentOS" or ansible_distribution == "RedHat"
- ansible_distribution_major_version == '7'
- ansible_distribution_version|regex_replace('7.3.*', '7.3') == '7.3'
- distribution_minor_version|int >= 3

# Checking that NTP is configured. Based on RHEL 7 *System Administrators
# Guide*.
Expand Down

0 comments on commit f17b987

Please sign in to comment.