Procházet zdrojové kódy

fix(oracle-7): use `osmajorrelease` instead of `$releasever`

Avoid this error:

```
      ID: salt-master
Function: pkg.installed
  Result: False
 Comment: Error occurred installing package(s). Additional info follows:

   errors:
       - Running scope as unit run-402.scope.
         Loaded plugins: ovl, ulninfo
         https://repo.saltproject.io/py3/redhat/7Server/x86_64/3002/repodata/repomd.xml:
             [Errno 14] HTTPS Error 404 - Not Found
         Trying other mirror.
         No package salt-master available.
         Error: Nothing to do
```
tags/v1.8.5
Imran Iqbal před 3 roky
rodič
revize
5146c449d5
Žádný účet není propojen s e-mailovou adresou tvůrce revize
8 změnil soubory, kde provedl 58 přidání a 34 odebrání
  1. +1
    -0
      .yamllint
  2. +9
    -4
      salt/map.jinja
  3. +18
    -0
      salt/osfingermap.yaml
  4. +18
    -18
      salt/osmap.yaml
  5. +3
    -3
      test/integration/v3000-py3/files/_mapdata/oraclelinux-7.yaml
  6. +3
    -3
      test/integration/v3001-py3/files/_mapdata/oraclelinux-7.yaml
  7. +3
    -3
      test/integration/v3002-py3/files/_mapdata/oraclelinux-7.yaml
  8. +3
    -3
      test/integration/v3003-py3/files/_mapdata/oraclelinux-7.yaml

+ 1
- 0
.yamllint Zobrazit soubor

@@ -21,6 +21,7 @@ ignore: |
kitchen.vagrant.yml
salt/osfamilymap.yaml
salt/osmap.yaml
salt/osfingermap.yaml

yaml-files:
# Default settings

+ 9
- 4
salt/map.jinja Zobrazit soubor

@@ -5,14 +5,19 @@
{% import_yaml "salt/defaults.yaml" as defaults %}
{% import_yaml "salt/osfamilymap.yaml" as osfamilymap %}
{% import_yaml "salt/osmap.yaml" as osmap %}
{% import_yaml "salt/osfingermap.yaml" as osfingermap %}

{# merge the osfamilymap #}
{% set osfamily = salt['grains.filter_by'](osfamilymap, grain='os_family') or{} %}
{% do salt['defaults.merge'](defaults['salt'], osfamily) %}
{% set osfamily_map = salt['grains.filter_by'](osfamilymap, grain='os_family') or {} %}
{% do salt['defaults.merge'](defaults['salt'], osfamily_map) %}

{# merge the osmap #}
{% set osmap = salt['grains.filter_by'](osmap, grain='os') or{} %}
{% do salt['defaults.merge'](defaults['salt'], osmap) %}
{% set os_map = salt['grains.filter_by'](osmap, grain='os') or {} %}
{% do salt['defaults.merge'](defaults['salt'], os_map) %}

{# merge the osfingermap #}
{% set osfinger_map = salt['grains.filter_by'](osfingermap, grain='osfinger') or {} %}
{% do salt['defaults.merge'](defaults['salt'], osfinger_map) %}

{# merge the lookup #}
{% set lookup = salt['pillar.get']('salt:lookup', default={}, merge=True) %}

+ 18
- 0
salt/osfingermap.yaml Zobrazit soubor

@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---

{%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}

{%- set osrelease = salt['grains.get']('osrelease', '') %}
{%- set salt_release = salt['pillar.get']('salt:release', 'latest') %}
{%- if salt_release.split('.')|length >= 3 %}
{%- set salt_release = 'archive/' ~ salt_release %}
{%- endif %}
{%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}

Oracle Linux Server-7:
pkgrepo_humanname: SaltStack repo for RHEL/CentOS {{ osmajorrelease }}
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/redhat/{{ osmajorrelease }}/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'

+ 18
- 18
salt/osmap.yaml Zobrazit soubor

@@ -2,18 +2,18 @@
# vim: ft=yaml
---

{%- set py_ver_dir = salt['pillar.get']('salt:py_ver', '') %}
{%- set py_ver_repr = salt['pillar.get']('salt:py_ver', '') %}

{% set osrelease = salt['grains.get']('osrelease') %}
{% set salt_release = salt['pillar.get']('salt:release', 'latest') %}
{% if salt_release.split('.')|length >= 3 %}
{% set salt_release = 'archive/' ~ salt_release %}
{% endif %}
{% set os_lower = salt['grains.get']('os')|lower %}
{% set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
{% set oscodename = salt['grains.get']('oscodename') %}
{% set os_family_lower = salt['grains.get']('os_family')|lower %}
{% set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}
{%- set osrelease = salt['grains.get']('osrelease', '') %}
{%- set salt_release = salt['pillar.get']('salt:release', 'latest') %}
{%- if salt_release.split('.')|length >= 3 %}
{%- set salt_release = 'archive/' ~ salt_release %}
{%- endif %}
{%- set os_lower = salt['grains.get']('os')|lower %}
{%- set osmajorrelease = salt['grains.get']('osmajorrelease', osrelease)|string %}
{%- set oscodename = salt['grains.get']('oscodename') %}
{%- set os_family_lower = salt['grains.get']('os_family')|lower %}
{%- set salt_repo = salt['pillar.get']('salt:repo', 'https://repo.saltproject.io') %}

Fedora:
pygit2: python2-pygit2
@@ -21,12 +21,12 @@ Fedora:
Amazon:
pkgrepo_name: saltstack-amzn-repo
pkgrepo_humanname: SaltStack repo for Amazon Linux 2
pkgrepo: '{{ salt_repo }}/{{ py_ver_dir or 'yum' }}/amazon/2/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_dir or 'yum' }}/amazon/2/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'yum' }}/amazon/2/$basearch/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'

Ubuntu:
pkgrepo: 'deb {{ salt_repo }}/{{ py_ver_dir or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
key_url: '{{ salt_repo }}/{{ py_ver_dir or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb {{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }} {{ oscodename }} main'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_lower }}/{{ osrelease }}/amd64/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pygit2: python-pygit2
gitfs:
pygit2:
@@ -36,8 +36,8 @@ Ubuntu:
install_from_package: Null

Raspbian:
pkgrepo: 'deb {{ salt_repo }}/{{ py_ver_dir or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
key_url: '{{ salt_repo }}/{{ py_ver_dir or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'
pkgrepo: 'deb {{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }} {{ oscodename }} main'
key_url: '{{ salt_repo }}/{{ py_ver_repr or 'apt' }}/{{ os_family_lower }}/{{ osmajorrelease }}/armhf/{{ salt_release }}/SALTSTACK-GPG-KEY.pub'

SmartOS:
salt_master: salt
@@ -49,7 +49,7 @@ SmartOS:
minion_service: 'salt:minion'
master_service: 'salt:master'
api_service: 'salt:api'
python_dulwich: {{ py_ver_dir or 'py27' }}{{ '-dulwich' }}
python_dulwich: {{ py_ver_repr or 'py27' }}{{ '-dulwich' }}
gitfs:
dulwich:
install_from_source: false

+ 3
- 3
test/integration/v3000-py3/files/_mapdata/oraclelinux-7.yaml Zobrazit soubor

@@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3000/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/py3/redhat/7/$basearch/3000/SALTSTACK-GPG-KEY.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
@@ -85,8 +85,8 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3000
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo: https://repo.saltproject.io/py3/redhat/7/$basearch/3000
pkgrepo_humanname: SaltStack repo for RHEL/CentOS 7
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2

+ 3
- 3
test/integration/v3001-py3/files/_mapdata/oraclelinux-7.yaml Zobrazit soubor

@@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3001/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/py3/redhat/7/$basearch/3001/SALTSTACK-GPG-KEY.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
@@ -85,8 +85,8 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3001
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo: https://repo.saltproject.io/py3/redhat/7/$basearch/3001
pkgrepo_humanname: SaltStack repo for RHEL/CentOS 7
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2

+ 3
- 3
test/integration/v3002-py3/files/_mapdata/oraclelinux-7.yaml Zobrazit soubor

@@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3002/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/py3/redhat/7/$basearch/3002/SALTSTACK-GPG-KEY.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
@@ -85,8 +85,8 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3002
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo: https://repo.saltproject.io/py3/redhat/7/$basearch/3002
pkgrepo_humanname: SaltStack repo for RHEL/CentOS 7
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2

+ 3
- 3
test/integration/v3003-py3/files/_mapdata/oraclelinux-7.yaml Zobrazit soubor

@@ -42,7 +42,7 @@ values:
version: 0.23.0
version: 0.23.0
install_packages: true
key_url: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003/SALTSTACK-GPG-KEY.pub
key_url: https://repo.saltproject.io/py3/redhat/7/$basearch/3003/SALTSTACK-GPG-KEY.pub
master:
ext_pillar:
- cmd_yaml: cat /etc/salt/yaml
@@ -85,8 +85,8 @@ values:
state: running
parallel: true
pin_version: false
pkgrepo: https://repo.saltproject.io/py3/redhat/$releasever/$basearch/3003
pkgrepo_humanname: SaltStack repo for RHEL/CentOS $releasever
pkgrepo: https://repo.saltproject.io/py3/redhat/7/$basearch/3003
pkgrepo_humanname: SaltStack repo for RHEL/CentOS 7
pkgrepo_name: saltstack
py_ver: py3
pygit2: python-pygit2

Načítá se…
Zrušit
Uložit