revert(pkg): use grains.osfinger in a format suitable for all platforms

This commit is contained in:
Javier Bértoli 2022-02-03 11:45:11 -03:00
parent ae52641cfc
commit 8fee9f05bd

View File

@ -153,7 +153,7 @@ nginx_zypp_repo:
{% endif %} {% endif %}
{% if grains.os_family == 'RedHat' %} {% if grains.os_family == 'RedHat' %}
{% if grains.osfinger in ['Amazon Linux-2'] %} {% if grains.get('osfinger', '') == 'Amazon Linux-2' %}
nginx_epel_repo: nginx_epel_repo:
pkgrepo.managed: pkgrepo.managed:
- name: epel - name: epel
@ -178,7 +178,7 @@ nginx_yum_repo:
{%- endif %} {%- endif %}
- name: nginx - name: nginx
- humanname: nginx repo - humanname: nginx repo
{%- if salt['grains.get']('os') == 'CentOS' %} {%- if grains.os == 'CentOS' %}
- baseurl: 'http://nginx.org/packages/centos/$releasever/$basearch/' - baseurl: 'http://nginx.org/packages/centos/$releasever/$basearch/'
{%- else %} {%- else %}
- baseurl: 'http://nginx.org/packages/rhel/{{ nginx.lookup.rh_os_releasever }}/$basearch/' - baseurl: 'http://nginx.org/packages/rhel/{{ nginx.lookup.rh_os_releasever }}/$basearch/'