Skip to content

Commit d4f8a74

Browse files
authored
Merge pull request #144 from noelmcloughlin/osarch
feat(mapping): introduce osarchmap per issue #142
2 parents 4b2d9e4 + d71a258 commit d4f8a74

File tree

11 files changed

+103
-20
lines changed

11 files changed

+103
-20
lines changed

AUTHORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This list is sorted by the number of commits per contributor in _descending_ ord
44

55
Avatar|Contributor|Contributions
66
:-:|---|:-:
7-
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|163
7+
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>|[@myii](https://github.com/myii)|167
88
<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>|[@aboe76](https://github.com/aboe76)|22
99
<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/242396?v=4' width='36' height='36' alt='@javierbertoli'>|[@javierbertoli](https://github.com/javierbertoli)|17
1010
<img class='float-left rounded-1' src='https://avatars3.githubusercontent.com/u/3433835?v=4' width='36' height='36' alt='@n-rodriguez'>|[@n-rodriguez](https://github.com/n-rodriguez)|8
@@ -29,4 +29,4 @@ Avatar|Contributor|Contributions
2929

3030
---
3131

32-
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-07-08.
32+
Auto-generated by a [forked version](https://github.com/myii/maintainer) of [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2019-07-24.

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## [3.0.9](https://github.com/saltstack-formulas/template-formula/compare/v3.0.8...v3.0.9) (2019-07-24)
4+
5+
6+
### Bug Fixes
7+
8+
* **libtofs:** don't crash if “tofs.files_switch” lookup a list ([0979d35](https://github.com/saltstack-formulas/template-formula/commit/0979d35))
9+
10+
11+
### Documentation
12+
13+
* **contributing:** add recent `semantic-release` formula ([f9def86](https://github.com/saltstack-formulas/template-formula/commit/f9def86))
14+
* **contributing:** add recent `semantic-release` formula ([ed8c55a](https://github.com/saltstack-formulas/template-formula/commit/ed8c55a))
15+
* **contributing:** add recent `semantic-release` formulas ([57d0b85](https://github.com/saltstack-formulas/template-formula/commit/57d0b85))
16+
17+
18+
### Tests
19+
20+
* **libtofs:** “tofs.files_switch” lookup can return a list ([13f1728](https://github.com/saltstack-formulas/template-formula/commit/13f1728))
21+
322
## [3.0.8](https://github.com/saltstack-formulas/template-formula/compare/v3.0.7...v3.0.8) (2019-07-08)
423

524

FORMULA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: template
22
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
33
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
4-
version: 3.0.8
4+
version: 3.0.9
55
release: 1
66
minimum_version: 2016.11
77
summary: template formula

docs/AUTHORS.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This list is sorted by the number of commits per contributor in *descending* ord
1515
- Contributions
1616
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars2.githubusercontent.com/u/10231489?v=4' width='36' height='36' alt='@myii'>`
1717
- `@myii <https://github.com/myii>`_
18-
- 163
18+
- 167
1919
* - :raw-html-m2r:`<img class='float-left rounded-1' src='https://avatars0.githubusercontent.com/u/1800660?v=4' width='36' height='36' alt='@aboe76'>`
2020
- `@aboe76 <https://github.com/aboe76>`_
2121
- 22
@@ -83,4 +83,4 @@ This list is sorted by the number of commits per contributor in *descending* ord
8383

8484
----
8585

86-
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-07-08.
86+
Auto-generated by a `forked version <https://github.com/myii/maintainer>`_ of `gaocegege/maintainer <https://github.com/gaocegege/maintainer>`_ on 2019-07-24.

docs/CHANGELOG.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
Changelog
33
=========
44

5+
`3.0.9 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.8...v3.0.9>`_ (2019-07-24)
6+
----------------------------------------------------------------------------------------------------------
7+
8+
Bug Fixes
9+
^^^^^^^^^
10+
11+
12+
* **libtofs:** don't crash if “tofs.files_switch” lookup a list (\ `0979d35 <https://github.com/saltstack-formulas/template-formula/commit/0979d35>`_\ )
13+
14+
Documentation
15+
^^^^^^^^^^^^^
16+
17+
18+
* **contributing:** add recent ``semantic-release`` formula (\ `f9def86 <https://github.com/saltstack-formulas/template-formula/commit/f9def86>`_\ )
19+
* **contributing:** add recent ``semantic-release`` formula (\ `ed8c55a <https://github.com/saltstack-formulas/template-formula/commit/ed8c55a>`_\ )
20+
* **contributing:** add recent ``semantic-release`` formulas (\ `57d0b85 <https://github.com/saltstack-formulas/template-formula/commit/57d0b85>`_\ )
21+
22+
Tests
23+
^^^^^
24+
25+
26+
* **libtofs:** “tofs.files_switch” lookup can return a list (\ `13f1728 <https://github.com/saltstack-formulas/template-formula/commit/13f1728>`_\ )
27+
528
`3.0.8 <https://github.com/saltstack-formulas/template-formula/compare/v3.0.7...v3.0.8>`_ (2019-07-08)
629
----------------------------------------------------------------------------------------------------------
730

template/map.jinja

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
{%- set tplroot = tpldir.split('/')[0] %}
66
{#- Start imports as #}
77
{%- import_yaml tplroot ~ "/defaults.yaml" as default_settings %}
8+
{%- import_yaml tplroot ~ "/osarchmap.yaml" as osarchmap %}
89
{%- import_yaml tplroot ~ "/osfamilymap.yaml" as osfamilymap %}
910
{%- import_yaml tplroot ~ "/osmap.yaml" as osmap %}
1011
{%- import_yaml tplroot ~ "/osfingermap.yaml" as osfingermap %}
@@ -16,23 +17,27 @@
1617
default_settings,
1718
default=tplroot,
1819
merge=salt['grains.filter_by'](
19-
osfamilymap,
20-
grain='os_family',
20+
osarchmap,
21+
grain='osarch',
2122
merge=salt['grains.filter_by'](
22-
osmap,
23-
grain='os',
23+
osfamilymap,
24+
grain='os_family',
2425
merge=salt['grains.filter_by'](
25-
osfingermap,
26-
grain='osfinger',
26+
osmap,
27+
grain='os',
2728
merge=salt['grains.filter_by'](
28-
_config,
29-
default='lookup'
29+
osfingermap,
30+
grain='osfinger',
31+
merge=salt['grains.filter_by'](
32+
_config,
33+
default='lookup'
34+
)
3035
)
3136
)
3237
)
3338
)
3439
)
35-
%}
40+
%}
3641

3742
{%- set config = salt['grains.filter_by'](
3843
{'defaults': defaults},

template/osarchmap.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=yaml
3+
#
4+
# Setup variables using grains['osarch'] based logic.
5+
# You just need to add the key:values for an `osarch` that differ
6+
# from `defaults.yaml`.
7+
# Only add an `osarch` which is/will be supported by the formula.
8+
#
9+
# If you do not need to provide defaults via the `osarch` grain,
10+
# you will need to provide at least an empty dict in this file, e.g.
11+
# osarch: {}
12+
---
13+
amd64:
14+
arch: amd64
15+
16+
x86_64:
17+
arch: amd64
18+
19+
386:
20+
arch: 386
21+
22+
arm64:
23+
arch: arm64
24+
25+
armv6l:
26+
arch: armv6l
27+
28+
armv7l:
29+
arch: armv7l
30+
31+
ppc64le:
32+
arch: ppc64le
33+
34+
s390x:
35+
arch: s390x

template/osfamilymap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# Setup variables using grains['os_family'] based logic.
55
# You just need to add the key:values for an `os_family` that differ
6-
# from `defaults.yaml`.
7-
# Only add an `os_family` which is/will be supported by the formula
6+
# from `defaults.yaml` + `osarch.yaml`.
7+
# Only add an `os_family` which is/will be supported by the formula.
88
#
99
# If you do not need to provide defaults via the `os_family` grain,
1010
# you will need to provide at least an empty dict in this file, e.g.

template/osfingermap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# Setup variables using grains['osfinger'] based logic.
55
# You just need to add the key:values for an `osfinger` that differ
6-
# from `defaults.yaml` + `os_family.yaml` + `osmap.yaml`.
7-
# Only add an `osfinger` which is/will be supported by the formula
6+
# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml` + `osmap.yaml`.
7+
# Only add an `osfinger` which is/will be supported by the formula.
88
#
99
# If you do not need to provide defaults via the `os_finger` grain,
1010
# you will need to provide at least an empty dict in this file, e.g.

template/osmap.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#
44
# Setup variables using grains['os'] based logic.
55
# You just need to add the key:values for an `os` that differ
6-
# from `defaults.yaml` + `os_family.yaml`.
7-
# Only add an `os` which is/will be supported by the formula
6+
# from `defaults.yaml` + `osarch.yaml` + `os_family.yaml`.
7+
# Only add an `os` which is/will be supported by the formula.
88
#
99
# If you do not need to provide defaults via the `os` grain,
1010
# you will need to provide at least an empty dict in this file, e.g.

0 commit comments

Comments
 (0)