diff --git a/defaults/main.yml b/defaults/main.yml index 909a255..7e68264 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -12,3 +12,21 @@ pam_pwd_enforce_root: "enforce_for_root" pam_pwd_policy_name: "password-policy" pam_pwd_deny: "5" pam_pwd_unlock_time: "300" + +# BEGIN - DO NOT EDIT THIS BLOCK - rh distros variables +# Ansible distribution identifiers that the role treats like RHEL +__pam_pwd_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__pam_pwd_rh_distros_fedora: "{{ __pam_pwd_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__pam_pwd_is_rh_distro: "{{ ansible_distribution in __pam_pwd_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__pam_pwd_is_rh_distro_fedora: "{{ ansible_distribution in __pam_pwd_rh_distros_fedora }}" +# END - DO NOT EDIT THIS BLOCK - rh distros variables diff --git a/tests/vars/rh_distros_vars.yml b/tests/vars/rh_distros_vars.yml new file mode 100644 index 0000000..dec17ff --- /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 +__pam_pwd_rh_distros: + - AlmaLinux + - CentOS + - RedHat + - Rocky + +# Same as above but includes Fedora +__pam_pwd_rh_distros_fedora: "{{ __pam_pwd_rh_distros + ['Fedora'] }}" + +# Use this in conditionals to check if distro is Red Hat or clone +__pam_pwd_is_rh_distro: "{{ ansible_distribution in __pam_pwd_rh_distros }}" + +# Use this in conditionals to check if distro is Red Hat or clone, or Fedora +__pam_pwd_is_rh_distro_fedora: "{{ ansible_distribution in __pam_pwd_rh_distros_fedora }}"