Commit graph

25 commits

Author SHA1 Message Date
Daniel Dehennin
42e19322c9 feat(map): update to v5 map.jinja
The v5 `map.jinja` is a generic and configurable system to load
configuration values, exposed as the `mapdata` variable, from
different places:

- YAML files and templates from the fileserver for non-secret data
- pillars or SDB are preferred for secret data
- grains or `config.get`

The `map.jinja` optional sources are configured with compound targeting like
syntax `[<TYPE>[:<OPTION>[:<DELIMITER>]]@]<KEY>` with the following
default ordered sources:

- `Y:G@osarch`: YAML file and Jinja template named after `osarch` grain
- `Y:G@os_family`: YAML file and Jinja template named after `os_family` grain
- `Y:G@os` YAML file and Jinja template named after `os` grain
- `Y:G@osfinger` YAML file and Jinja template named after `osfinger` grain
- `C@{{ tplroot ~ ':lookup' }}`: dict retrieved with `salt["config.get"]`
- `C@{{ tplroot }}`: dict retrieved with `salt["config.get"]`
- `Y:G@id`: YAML file and Jinja template named after `osarch` grain

This is done by two new libraries:

- `libmatchers.jinja` provides the `parse_matchers` macro to parse
  strings looking like compound matchers, for example `Y:G@osarch`

- `libmapstack.jinja` provides the `mapstack` macro to load
  configuration from different sources described by matchers

Post-processing of `mapdata` variable can be done in a `parameters/post-map.jinja`.

The v5 `map.jinja` is documented in `docs/map.jinja.rst`.

BREAKING CHANGE: `map.jinja` now exports a generic `mapdata` variable

BREAKING CHANGE: The per grain parameter values are now under `TEMPLATE/parameters/`
2021-02-16 11:10:09 +01:00
Dafydd Jones
a999fee214 fix(convert-formula.sh): add -_ to allowed chars in formula name 2020-10-14 22:42:18 +01:00
Dafydd Jones
c78c06876e docs: add basic pre-commit usage instructions 2020-07-27 22:20:45 +01:00
Dafydd Jones
d98d98f4da docs: fix whitespace 2020-07-27 21:57:20 +01:00
Dafydd Jones
cceffffef5 feat(convert-formula.sh): assign @NONE as whole-formula owner 2020-05-12 00:03:27 +01:00
N
44bc362742
Merge pull request #136 from noelmcloughlin/docs
docs(readme): show only one level in table of contents
2020-04-25 17:49:32 +02:00
Dafydd Jones
539a335f8b docs(convert-formula.sh): add usage guide 2019-12-19 15:28:04 +00:00
Dafydd Jones
2e8ded6565 refactor: improve reusability using an unique keyword TEMPLATE
BREAKING CHANGE: changed all state names and ids
2019-12-04 23:47:41 +00:00
Imran Iqbal
ed8d0dd833
Merge pull request #161 from noelmcloughlin/special
docs(readme): special notes section
2019-10-16 16:20:41 +01:00
Imran Iqbal
ed61d09af0
docs(readme): update link to CONTRIBUTING [skip ci] 2019-10-14 11:39:21 +01:00
N
c68aed500b
docs(reamde): have special notes section 2019-08-17 20:14:16 +01:00
Daniel Dehennin
6b595cd8ce docs(readme): describe the new “template.subcomponent” states
The subcomponent only provides a configuration file and its cleaning
state.
2019-07-30 16:13:37 +02:00
N
446b815958
docs(readme): show only one level in table of contents 2019-06-04 13:02:57 +01:00
Imran Iqbal
d931ed1672
docs(readme): tidy headings 2019-05-27 12:40:21 +01:00
Nicolas Rodriguez
7bb7c532b9 ci(kitchen): add Bundler binstub for Kitchen 2019-05-26 20:29:22 +02:00
Imran Iqbal
e04413e52d
docs(readme): add testing requirements section (from vault-formula)
* https://github.com/saltstack-formulas/vault-formula/blob/43dc95d/docs/README.rst#requirements
2019-05-23 14:01:46 +01:00
Eric Veiras Galisson
741896dc1e docs: move contributing sections and links to ease adaptation 2019-05-16 11:25:43 +01:00
Imran Iqbal
c309d5f683
docs(readme): add testing section based on postgres-formula 2019-05-13 16:04:05 +01:00
Imran Iqbal
ad5a8b84bf
docs(rtd): clean up numerous issues and inconsistencies
* Include:
  - Fix link texts
  - Apply text formatting
  - Split some of the long lines (improved diffs)
  - Remove extra `\ ` appearing after conversion from Markdown
  - Improve ordered (numbered) nested lists
  - Use 3-character indents under RST directives
  - Use Jinja commenting in Jinja examples (not just `#`)
2019-03-03 00:11:35 +00:00
Imran Iqbal
dff0ee8ef8
docs(contributing): add documentation contribution guidelines 2019-03-02 23:56:21 +00:00
Imran Iqbal
f47797d1fc
docs(readme): add Read the Docs build status badge 2019-03-01 16:32:17 +00:00
Imran Iqbal
da095281a8
docs(rtd): use internal link targets at the top of each .rst file
* Convert the existing internal link to use `:ref:` instead
2019-03-01 05:19:10 +00:00
Imran Iqbal
5a2bea8fdd
docs(readme): update heading markers for consistency 2019-03-01 01:10:05 +00:00
Imran Iqbal
474f318653
docs(contributing): convert to .rst and move to docs subdir
* Update link in `README.rst`
2019-03-01 00:59:37 +00:00
Imran Iqbal
c92f674469
docs(readme): move under docs subdir to access in both GitHub and RTD 2019-02-28 23:50:06 +00:00
Renamed from README.rst (Browse further)