Skip to content

Commit

Permalink
Merge pull request #726 from jayeshh123/var_chng
Browse files Browse the repository at this point in the history
Var chng
  • Loading branch information
rajan-mis authored Aug 29, 2023
2 parents 5dcea25 + f45b4f1 commit 9c711fe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
18 changes: 9 additions & 9 deletions roles/mrot_config/tasks/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,14 @@

# To check and install NetworkManager-dispatcher-routing-rules on cluster nodes and post that enable and start it.

- name: Get RHEL version
shell: cat /etc/redhat-release | grep -oE '[0-9]+\.[0-9]+' | head -1
register: rhel_version_output
- name: debug | Display OS distribution
debug:
var: ansible_distribution

- debug:
var: rhel_version_output.stdout_lines[0]
- name: debug | Display OS version
debug:
var: ansible_distribution_version

- name: Parse RHEL version
set_fact:
rhel_version: "{{ rhel_version_output.stdout_lines[0] }}"

- name: Install tasks block for RHEL
block:
Expand Down Expand Up @@ -75,4 +73,6 @@
name: NetworkManager-dispatcher
state: started
when: nmd_installed.changed == true
when: rhel_version in ["7.9", "8.6"] and 'RedHat' in ansible_facts.distribution
when:
- ansible_distribution in scale_rhel_distribution
- ansible_distribution_version in scale_rhel_version
12 changes: 11 additions & 1 deletion roles/mrot_config/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@

# Interface names
scale_pri_interface_name: "eth0"
scale_sec_interface_name: "eth1"
scale_sec_interface_name: "eth1"

# Supported scale OS distrubution
scale_rhel_distribution:
- RedHat
- CentOS

# Supported version RHEL OS
scale_rhel_version:
- "7.9"
- "8.6"

0 comments on commit 9c711fe

Please sign in to comment.