diff --git a/pillar/osfullname/Leap.sls b/pillar/osfullname/Leap.sls new file mode 100644 index 0000000..b2e1876 --- /dev/null +++ b/pillar/osfullname/Leap.sls @@ -0,0 +1,12 @@ +{% set osrelease = salt['grains.get']('osrelease') %} + +zypper: + repositories: + repo-oss: + baseurl: http://download.infra.opensuse.org/distribution/leap/{{ osrelease }}/repo/oss + priority: 99 + refresh: False + repo-update-oss: + baseurl: http://download.infra.opensuse.org/update/leap/{{ osrelease }}/oss + priority: 99 + refresh: True diff --git a/pillar/osfullname/SLES.sls b/pillar/osfullname/SLES.sls new file mode 100644 index 0000000..792d600 --- /dev/null +++ b/pillar/osfullname/SLES.sls @@ -0,0 +1 @@ +# diff --git a/pillar/osmajorrelease/11.sls b/pillar/osmajorrelease/11.sls index 792d600..8cd747b 100644 --- a/pillar/osmajorrelease/11.sls +++ b/pillar/osmajorrelease/11.sls @@ -1 +1,20 @@ -# +{% set osminorrelease = salt['grains.get']('osrelease_info')[1]|string %} + +zypper: + repositories: + SLE-SDK: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLE11-SDK-SP{{ osminorrelease }}-Pool/sle-11-x86_64 + priority: 99 + refresh: False + SLE-SDK-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLE11-SDK-SP{{ osminorrelease }}-Updates/sle-11-x86_64 + priority: 99 + refresh: True + SLE-SERVER: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLES11-{{ osminorrelease }}-Pool/sle-11-x86_64 + priority: 99 + refresh: False + SLE-SERVER-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLES11-{{ osminorrelease }}-Updates/sle-11-x86_64 + priority: 99 + refresh: True diff --git a/pillar/osmajorrelease/12.sls b/pillar/osmajorrelease/12.sls index 792d600..ba50ad2 100644 --- a/pillar/osmajorrelease/12.sls +++ b/pillar/osmajorrelease/12.sls @@ -1 +1,49 @@ -# +{% set osrelease_info = salt['grains.get']('osrelease_info') %} + +{% set version = osrelease_info[0]|string %} +{% if osrelease_info|length == 2 %} + {% set version = version + '-SP' + osrelease_info[1]|string %} +{% endif %} + +zypper: + repositories: + SLE-HA: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-HA/{{ version }}/x86_64/product + priority: 99 + refresh: False + SLE-HA-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-HA/{{ version }}/x86_64/update + priority: 99 + refresh: True + SLE-Module-Adv-Systems-Management: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Adv-Systems-Management/12/x86_64/product + priority: 99 + refresh: False + SLE-Module-Adv-Systems-Management-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Adv-Systems-Management/12/x86_64/update + priority: 99 + refresh: True + SLE-Module-Web-Scripting: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Web-Scripting/12/x86_64/product + priority: 99 + refresh: False + SLE-Module-Web-Scripting-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Web-Scripting/12/x86_64/update + priority: 99 + refresh: True + SLE-SDK: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SDK/{{ version }}/x86_64/product + priority: 99 + refresh: False + SLE-SDK-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SDK/{{ version }}/x86_64/update + priority: 99 + refresh: True + SLE-SERVER: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SERVER/{{ version }}/x86_64/product + priority: 99 + refresh: False + SLE-SERVER-Update: + baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SERVER/{{ version }}/x86_64/update + priority: 99 + refresh: True diff --git a/pillar/osrelease/11_4.sls b/pillar/osrelease/11_4.sls deleted file mode 100644 index a71c17c..0000000 --- a/pillar/osrelease/11_4.sls +++ /dev/null @@ -1,18 +0,0 @@ -zypper: - repositories: - SLE-SDK: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLE11-SDK-SP4-Pool/sle-11-x86_64 - priority: 99 - refresh: False - SLE-SDK-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLE11-SDK-SP4-Updates/sle-11-x86_64 - priority: 99 - refresh: True - SLE-SERVER: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLES11-SP4-Pool/sle-11-x86_64 - priority: 99 - refresh: False - SLE-SERVER-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SLES11-SP4-Updates/sle-11-x86_64 - priority: 99 - refresh: True diff --git a/pillar/osrelease/12.sls b/pillar/osrelease/12.sls deleted file mode 100644 index 3124d22..0000000 --- a/pillar/osrelease/12.sls +++ /dev/null @@ -1,42 +0,0 @@ -zypper: - repositories: - SLE-HA: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-HA/12/x86_64/product - priority: 99 - refresh: False - SLE-HA-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-HA/12/x86_64/update - priority: 99 - refresh: True - SLE-Module-Adv-Systems-Management: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Adv-Systems-Management/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Adv-Systems-Management-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Adv-Systems-Management/12/x86_64/update - priority: 99 - refresh: True - SLE-Module-Web-Scripting: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Web-Scripting/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Web-Scripting-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Web-Scripting/12/x86_64/update - priority: 99 - refresh: True - SLE-SDK: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SDK/121/x86_64/product - priority: 99 - refresh: False - SLE-SDK-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SDK/12/x86_64/update - priority: 99 - refresh: True - SLE-SERVER: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SERVER/12/x86_64/product - priority: 99 - refresh: False - SLE-SERVER-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SERVER/12/x86_64/update - priority: 99 - refresh: True diff --git a/pillar/osrelease/12_1.sls b/pillar/osrelease/12_1.sls deleted file mode 100644 index 4ebb189..0000000 --- a/pillar/osrelease/12_1.sls +++ /dev/null @@ -1,42 +0,0 @@ -zypper: - repositories: - SLE-HA: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-HA/12-SP1/x86_64/product - priority: 99 - refresh: False - SLE-HA-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-HA/12-SP1/x86_64/update - priority: 99 - refresh: True - SLE-Module-Adv-Systems-Management: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Adv-Systems-Management/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Adv-Systems-Management-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Adv-Systems-Management/12/x86_64/update - priority: 99 - refresh: True - SLE-Module-Web-Scripting: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Web-Scripting/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Web-Scripting-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Web-Scripting/12/x86_64/update - priority: 99 - refresh: True - SLE-SDK: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SDK/12-SP1/x86_64/product - priority: 99 - refresh: False - SLE-SDK-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SDK/12-SP1/x86_64/update - priority: 99 - refresh: True - SLE-SERVER: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SERVER/12-SP1/x86_64/product - priority: 99 - refresh: False - SLE-SERVER-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SERVER/12-SP1/x86_64/update - priority: 99 - refresh: True diff --git a/pillar/osrelease/12_2.sls b/pillar/osrelease/12_2.sls deleted file mode 100644 index ec33325..0000000 --- a/pillar/osrelease/12_2.sls +++ /dev/null @@ -1,42 +0,0 @@ -zypper: - repositories: - SLE-HA: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-HA/12-SP2/x86_64/product - priority: 99 - refresh: False - SLE-HA-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-HA/12-SP2/x86_64/update - priority: 99 - refresh: True - SLE-Module-Adv-Systems-Management: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Adv-Systems-Management/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Adv-Systems-Management-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Adv-Systems-Management/12/x86_64/update - priority: 99 - refresh: True - SLE-Module-Web-Scripting: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-Module-Web-Scripting/12/x86_64/product - priority: 99 - refresh: False - SLE-Module-Web-Scripting-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-Module-Web-Scripting/12/x86_64/update - priority: 99 - refresh: True - SLE-SDK: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SDK/12-SP2/x86_64/product - priority: 99 - refresh: False - SLE-SDK-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SDK/12-SP2/x86_64/update - priority: 99 - refresh: True - SLE-SERVER: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Products/SLE-SERVER/12-SP2/x86_64/product - priority: 99 - refresh: False - SLE-SERVER-Update: - baseurl: http://smt-internal.infra.opensuse.org/repo/$RCE/SUSE/Updates/SLE-SERVER/12-SP2/x86_64/update - priority: 99 - refresh: True diff --git a/pillar/osrelease/42_1.sls b/pillar/osrelease/42_1.sls deleted file mode 100644 index b46c51b..0000000 --- a/pillar/osrelease/42_1.sls +++ /dev/null @@ -1,10 +0,0 @@ -zypper: - repositories: - repo-oss: - baseurl: http://download.infra.opensuse.org/distribution/leap/42.1/repo/oss - priority: 99 - refresh: False - repo-update-oss: - baseurl: http://download.infra.opensuse.org/update/leap/42.1/oss - priority: 99 - refresh: True diff --git a/pillar/osrelease/42_2.sls b/pillar/osrelease/42_2.sls deleted file mode 100644 index 6e0c273..0000000 --- a/pillar/osrelease/42_2.sls +++ /dev/null @@ -1,10 +0,0 @@ -zypper: - repositories: - repo-oss: - baseurl: http://download.infra.opensuse.org/distribution/leap/42.2/repo/oss - priority: 99 - refresh: False - repo-update-oss: - baseurl: http://download.infra.opensuse.org/update/leap/42.2/oss - priority: 99 - refresh: True diff --git a/pillar/osrelease/42_3.sls b/pillar/osrelease/42_3.sls deleted file mode 100644 index 7ad0737..0000000 --- a/pillar/osrelease/42_3.sls +++ /dev/null @@ -1,11 +0,0 @@ -zypper: - repositories: - repo-oss: - baseurl: http://download.infra.opensuse.org/distribution/leap/42.3/repo/oss - priority: 99 - # TODO: disable refresh after 42.3 release - refresh: True - repo-update-oss: - baseurl: http://download.infra.opensuse.org/update/leap/42.3/oss - priority: 99 - refresh: True diff --git a/pillar/role/wiki.sls b/pillar/role/wiki.sls index 657c698..0c78a13 100644 --- a/pillar/role/wiki.sls +++ b/pillar/role/wiki.sls @@ -113,7 +113,7 @@ zypper: tar: {} repositories: openSUSE:infrastructure:wiki: - baseurl: http://download.opensuse.org/repositories/openSUSE:/infrastructure:/wiki/openSUSE_Leap_{{ grains['osrelease'] }} + baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure:/wiki/openSUSE_Leap_{{ salt['grains.get']('osrelease') }} gpgcheck: 0 priority: 100 refresh: True diff --git a/pillar/role/wikisearch.sls b/pillar/role/wikisearch.sls index 87b0e04..60b80fa 100644 --- a/pillar/role/wikisearch.sls +++ b/pillar/role/wikisearch.sls @@ -50,7 +50,7 @@ sudoers: zypper: repositories: openSUSE:infrastructure:wiki: - baseurl: http://download.opensuse.org/repositories/openSUSE:/infrastructure:/wiki/openSUSE_Leap_{{ grains['osrelease'] }} + baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure:/wiki/openSUSE_Leap_{{ salt['grains.get']('osrelease') }} gpgcheck: 0 priority: 100 refresh: True diff --git a/pillar/salt_cluster/opensuse/osfullname/Leap.sls b/pillar/salt_cluster/opensuse/osfullname/Leap.sls new file mode 100644 index 0000000..b1d07c3 --- /dev/null +++ b/pillar/salt_cluster/opensuse/osfullname/Leap.sls @@ -0,0 +1,7 @@ +zypper: + repositories: + openSUSE:infrastructure: + baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Leap_{{ salt['grains.get']('osrelease') }} + gpgautoimport: True + priority: 100 + refresh: True diff --git a/pillar/salt_cluster/opensuse/osfullname/SLES.sls b/pillar/salt_cluster/opensuse/osfullname/SLES.sls new file mode 100644 index 0000000..b5f9b48 --- /dev/null +++ b/pillar/salt_cluster/opensuse/osfullname/SLES.sls @@ -0,0 +1,14 @@ +{% set osrelease_info = salt['grains.get']('osrelease_info') %} + +{% set version = osrelease_info[0]|string %} +{% if osrelease_info|length == 2 %} + {% set version = version + '_SP' + osrelease_info[1]|string %} +{% endif %} + +zypper: + repositories: + openSUSE:infrastructure: + baseurl: https://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/SLE_{{ version }} + gpgautoimport: True + priority: 100 + refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/11_4.sls b/pillar/salt_cluster/opensuse/osrelease/11_4.sls deleted file mode 100644 index 7ca2a96..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/11_4.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: https://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/SLE_11_SP4 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/12.sls b/pillar/salt_cluster/opensuse/osrelease/12.sls deleted file mode 100644 index bd77bd0..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/12.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/SLE_12 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/12_1.sls b/pillar/salt_cluster/opensuse/osrelease/12_1.sls deleted file mode 100644 index 1aeb8c0..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/12_1.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/SLE_12_SP1 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/12_2.sls b/pillar/salt_cluster/opensuse/osrelease/12_2.sls deleted file mode 100644 index c776854..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/12_2.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/SLE_12_SP2 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/42_1.sls b/pillar/salt_cluster/opensuse/osrelease/42_1.sls deleted file mode 100644 index 99c2da0..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/42_1.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Leap_42.1 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/42_2.sls b/pillar/salt_cluster/opensuse/osrelease/42_2.sls deleted file mode 100644 index 2dbc6fb..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/42_2.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Leap_42.2 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/salt_cluster/opensuse/osrelease/42_3.sls b/pillar/salt_cluster/opensuse/osrelease/42_3.sls deleted file mode 100644 index 29ffae4..0000000 --- a/pillar/salt_cluster/opensuse/osrelease/42_3.sls +++ /dev/null @@ -1,7 +0,0 @@ -zypper: - repositories: - openSUSE:infrastructure: - baseurl: http://download.infra.opensuse.org/repositories/openSUSE:/infrastructure/openSUSE_Leap_42.3 - gpgautoimport: True - priority: 100 - refresh: True diff --git a/pillar/top.sls b/pillar/top.sls index 54fa63f..3b5834a 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -1,8 +1,8 @@ {% set country = salt['grains.get']('country') %} {% set domain = salt['grains.get']('domain') %} {% set id = salt['grains.get']('id') %} +{% set osfullname = salt['grains.get']('osfullname') %} {% set osmajorrelease = salt['grains.get']('osmajorrelease') %} -{% set osrelease = salt['grains.get']('osrelease') %} {% set roles = salt['grains.get']('roles', []) %} {% set salt_cluster = salt['grains.get']('salt_cluster') %} {% set virt_cluster = salt['grains.get']('virt_cluster', '') %} @@ -35,15 +35,15 @@ production: - match: grain - domain.{{ domain.replace('.', '_') }} {% endif %} + 'osfullname:{{ osfullname }}': + - match: grain + - osfullname.{{ osfullname }} 'osmajorrelease:{{ osmajorrelease }}': - match: grain - osmajorrelease.{{ osmajorrelease }} 'osmajorrelease:(1|4)2': - match: grain_pcre - osmajorrelease.12_or_42 - 'osrelease:{{ osrelease }}': - - match: grain - - osrelease.{{ osrelease.replace('.', '_') }} 'salt_cluster:(opensuse|suse_external)': - match: grain_pcre - salt_cluster.opensuse_or_suse_external @@ -51,7 +51,7 @@ production: 'salt_cluster:{{ salt_cluster }}': - match: grain - salt_cluster.{{ salt_cluster }} - - salt_cluster.{{ salt_cluster }}.osrelease.{{ osrelease.replace('.', '_') }} + - salt_cluster.{{ salt_cluster }}.osfullname.{{ osfullname }} '{{ id }}': - id.{{ id.replace('.', '_') }} {% endif %}