openssh-formula/openssh
Daniel Dehennin 1be0d8725a feat(map): use targeting like syntax for configuration
The `config_get_lookup` and `config_get` sources lack flexibility.

It's not easy to query several pillars and/or grains keys with the
actual system. And the query method is forced to `config.get` without
being configurable by the user.

We define a mechanism to select `map.jinja` sources with similar
notation as the salt targeting system.

The `map.jinja` file uses several sources where to lookup parameter
values. The list of sources can be modified by two files:

1. a global salt://parameters/map_jinja.yaml
2. a per formula salt://{{ tplroot }}/parameters/map_jinja.yaml.

Each source definition has the form `<TYPE>:<OPTION>@<KEY>` where
`<TYPE>` can be one of:

- `Y` to load values from YAML files, this is the default when no type
  is defined
- `C` to lookup values with `config.get`
- `G` to lookup values with `grains.get`
- `I` to lookup values with `pillar.get`

The YAML type option can define the query method to lookup the key
value to build the file name:

- `C` to query with `config.get`, this is the default when to query
  method is defined
- `G` to query with `grains.get`
- `I` to query with `pillar.get`

The `C`, `G` or `I` types can define the `SUB` option to store values
in the sub key `mapdata.<key>` instead of directly in `mapdata`.

Finally, the `<KEY>` describe what to lookup to either build the YAML
filename or gather values using one of the query method.

BREAKING CHANGE: the configuration `map_jinja:sources` is only
                 configurable with `salt://parameters/map_jinja.yaml`
		 and `salt://{{ tplroot }}/parameters/map_jinja.yaml`

BREAKING CHANGE: the `map_jinja:config_get_roots` is replaced by
                 compound like `map_jinja:sources`

BREAKING CHANGE: the two `config_get_lookup` and `config_get` are
                 replaced by `C@<tplroot>:lookup` and `C@<tplroot>`
		 sources
2021-01-11 17:31:22 +01:00
..
_mapdata refactor(map): use top-level values: key in map.jinja dumps 2020-12-23 16:42:23 +00:00
files/default fix(jinja): omit_ip_address don't work on some platform 2020-07-30 12:25:34 +02:00
parameters feat(map): use targeting like syntax for configuration 2021-01-11 17:31:22 +01:00
auth_map.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
auth.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
banner.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
client.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
config_ini.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
config.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
gather_host_keys.sls Pillar openssh.known_hosts_salt_ssh (#128) 2018-06-01 14:11:52 +02:00
init.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
known_hosts.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
libsaltcli.jinja feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00
libtofs.jinja style(libtofs.jinja): use Black-inspired Jinja formatting [skip ci] 2020-07-19 23:27:51 +01:00
map.jinja feat(map): use targeting like syntax for configuration 2021-01-11 17:31:22 +01:00
moduli.sls feat(map): update to v4 “map.jinja” 2020-07-31 10:54:40 +02:00