diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 45666c0c..f082bc0b 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -8,8 +8,8 @@ vault_os_packages: _vault_repository_url: "{% if (ansible_distribution | lower == 'fedora') %}\ https://rpm.releases.hashicorp.com/fedora/$releasever/$basearch/stable\ - {% elif (ansible_distribution | lower in ['amazon','amazonlinux']) %}\ - https://rpm.releases.hashicorp.com/AmazonLinux/$releasever/$basearch/stable + {% elif (ansible_distribution | lower == 'amazon') %}\ + https://rpm.releases.hashicorp.com/AmazonLinux/{{ '$releasever' if (ansible_distribution_major_version | length <= 1) else 'latest' }}/$basearch/stable {% else %}\ https://rpm.releases.hashicorp.com/RHEL/$releasever/$basearch/stable\ {% endif %}"