diff --git a/tests/vars/rh_distros_vars.yml b/tests/vars/rh_distros_vars.yml new file mode 100644 index 0000000..75d63ee --- /dev/null +++ b/tests/vars/rh_distros_vars.yml @@ -0,0 +1,20 @@ +# vars for handling conditionals for RedHat and clones +# DO NOT EDIT - file is auto-generated +# repo is https://github.com/linux-system-roles/.github +# file is playbooks/templates/tests/vars/rh_distros_vars.yml +--- +# Ansible distribution identifiers that the role treats like RHEL +__timesync_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__timesync_rh_distros_fedora: "{{ __timesync_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__timesync_is_rh_distro: "{{ ansible_distribution in __timesync_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__timesync_is_rh_distro_fedora: "{{ ansible_distribution in __timesync_rh_distros_fedora }}" diff --git a/vars/AlmaLinux_10.yml b/vars/AlmaLinux_10.yml deleted file mode 100644 index d6dd4cd..0000000 --- a/vars/AlmaLinux_10.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: /run/chrony-dhcp -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/AlmaLinux_10.yml b/vars/AlmaLinux_10.yml new file mode 120000 index 0000000..f830d5f --- /dev/null +++ b/vars/AlmaLinux_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/AlmaLinux_8.yml b/vars/AlmaLinux_8.yml deleted file mode 100644 index cce3f05..0000000 --- a/vars/AlmaLinux_8.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: "" -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/AlmaLinux_8.yml b/vars/AlmaLinux_8.yml new file mode 120000 index 0000000..ad7713d --- /dev/null +++ b/vars/AlmaLinux_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/AlmaLinux_9.yml b/vars/AlmaLinux_9.yml deleted file mode 100644 index d6dd4cd..0000000 --- a/vars/AlmaLinux_9.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: /run/chrony-dhcp -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/AlmaLinux_9.yml b/vars/AlmaLinux_9.yml new file mode 120000 index 0000000..0eb3795 --- /dev/null +++ b/vars/AlmaLinux_9.yml @@ -0,0 +1 @@ +RedHat_9.yml \ No newline at end of file diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml deleted file mode 100644 index d6dd4cd..0000000 --- a/vars/CentOS_10.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: /run/chrony-dhcp -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/CentOS_10.yml b/vars/CentOS_10.yml new file mode 120000 index 0000000..f830d5f --- /dev/null +++ b/vars/CentOS_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/CentOS_6.yml b/vars/CentOS_6.yml deleted file mode 100644 index 51e0fcb..0000000 --- a/vars/CentOS_6.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: ntp -timesync_chrony_dhcp_sourcedir: "" -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/CentOS_6.yml b/vars/CentOS_6.yml new file mode 120000 index 0000000..c4f61c3 --- /dev/null +++ b/vars/CentOS_6.yml @@ -0,0 +1 @@ +RedHat_6.yml \ No newline at end of file diff --git a/vars/CentOS_7.yml b/vars/CentOS_7.yml deleted file mode 100644 index cce3f05..0000000 --- a/vars/CentOS_7.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: "" -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/CentOS_7.yml b/vars/CentOS_7.yml new file mode 120000 index 0000000..105e630 --- /dev/null +++ b/vars/CentOS_7.yml @@ -0,0 +1 @@ +RedHat_7.yml \ No newline at end of file diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml deleted file mode 100644 index cce3f05..0000000 --- a/vars/CentOS_8.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: "" -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/CentOS_8.yml b/vars/CentOS_8.yml new file mode 120000 index 0000000..ad7713d --- /dev/null +++ b/vars/CentOS_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/CentOS_9.yml b/vars/CentOS_9.yml deleted file mode 100644 index d6dd4cd..0000000 --- a/vars/CentOS_9.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -timesync_ntp_provider_os_default: chrony -timesync_chrony_dhcp_sourcedir: /run/chrony-dhcp -timesync_chrony_sysconfig_path: /etc/sysconfig/chronyd -timesync_chrony_conf_path: "/etc/chrony.conf" -timesync_ntp_sysconfig_path: /etc/sysconfig/ntpd -timesync_ptp4l_sysconfig_path: /etc/sysconfig/ptp4l -timesync_phc2sys_sysconfig_path: /etc/sysconfig/phc2sys -# wokeignore:rule=master -timesync_timemaster_config_path: /etc/timemaster.conf diff --git a/vars/CentOS_9.yml b/vars/CentOS_9.yml new file mode 120000 index 0000000..0eb3795 --- /dev/null +++ b/vars/CentOS_9.yml @@ -0,0 +1 @@ +RedHat_9.yml \ No newline at end of file diff --git a/vars/Rocky_10.yml b/vars/Rocky_10.yml new file mode 120000 index 0000000..f830d5f --- /dev/null +++ b/vars/Rocky_10.yml @@ -0,0 +1 @@ +RedHat_10.yml \ No newline at end of file diff --git a/vars/Rocky_8.yml b/vars/Rocky_8.yml new file mode 120000 index 0000000..ad7713d --- /dev/null +++ b/vars/Rocky_8.yml @@ -0,0 +1 @@ +RedHat_8.yml \ No newline at end of file diff --git a/vars/Rocky_9.yml b/vars/Rocky_9.yml new file mode 120000 index 0000000..0eb3795 --- /dev/null +++ b/vars/Rocky_9.yml @@ -0,0 +1 @@ +RedHat_9.yml \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml index 5700868..213fb2d 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -18,3 +18,21 @@ __timesync_required_facts: # the 'gather_subset' parameter of the 'setup' module __timesync_required_facts_subsets: "{{ ['!all', '!min'] + __timesync_required_facts }}" + +# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables +# Ansible distribution identifiers that the role treats like RHEL +__timesync_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__timesync_rh_distros_fedora: "{{ __timesync_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__timesync_is_rh_distro: "{{ ansible_distribution in __timesync_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__timesync_is_rh_distro_fedora: "{{ ansible_distribution in __timesync_rh_distros_fedora }}" +# END - DO NOT EDIT THIS BLOCK - rh distros variables