mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
feat(mapping): introduce osarchmap per issue #13
This commit is contained in:
parent
72ea25fdd3
commit
41ac40d958
2 changed files with 48 additions and 8 deletions
|
@ -5,6 +5,7 @@
|
|||
{%- set tplroot = tpldir.split('/')[0] %}
|
||||
{#- Start imports as #}
|
||||
{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
|
||||
{%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %}
|
||||
{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
|
||||
{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
|
||||
{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
|
||||
|
@ -16,17 +17,21 @@
|
|||
default_settings,
|
||||
default=tplroot,
|
||||
merge=salt['grains.filter_by'](
|
||||
osfamilymap,
|
||||
grain='os_family',
|
||||
osarchmap,
|
||||
grain='osarch',
|
||||
merge=salt['grains.filter_by'](
|
||||
osmap,
|
||||
grain='os',
|
||||
osfamilymap,
|
||||
grain='os_family',
|
||||
merge=salt['grains.filter_by'](
|
||||
osfingermap,
|
||||
grain='osfinger',
|
||||
osmap,
|
||||
grain='os',
|
||||
merge=salt['grains.filter_by'](
|
||||
_config,
|
||||
default='lookup'
|
||||
osfingermap,
|
||||
grain='osfinger',
|
||||
merge=salt['grains.filter_by'](
|
||||
_config,
|
||||
default='lookup'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
35
template/osarchmap.yaml
Normal file
35
template/osarchmap.yaml
Normal file
|
@ -0,0 +1,35 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vim: ft=yaml
|
||||
#
|
||||
# Setup variables using grains['osarch'] based logic.
|
||||
# You just need to add the key:values for an `osarch` that differ
|
||||
# from `defaults.yaml` + `os_family.yaml`.
|
||||
# Only add an `osarch` which is/will be supported by the formula
|
||||
#
|
||||
# If you do not need to provide defaults via the `osarch` grain,
|
||||
# you will need to provide at least an empty dict in this file, e.g.
|
||||
# osarch: {}
|
||||
---
|
||||
amd64:
|
||||
arch: amd64
|
||||
|
||||
x86_64:
|
||||
arch: amd64
|
||||
|
||||
386:
|
||||
arch: 386
|
||||
|
||||
arm64:
|
||||
arch: arm64
|
||||
|
||||
armv6l:
|
||||
arch: armv6l
|
||||
|
||||
armv7l:
|
||||
arch: armv6l
|
||||
|
||||
ppc64le:
|
||||
arch: ppc64le
|
||||
|
||||
s390x:
|
||||
arch: s390x
|
Loading…
Add table
Reference in a new issue