Commit Graph

11 Commits

Author SHA1 Message Date
Imran Iqbal
286856058a
fix(openbsd): fix dig_pkg, avoid UsePAM & add verification file 2021-03-26 12:44:01 +00:00
Daniel Dehennin
df477b25c2 feat(map): update to v4 “map.jinja”
The `map.jinja` now exports a single variable called `mapdata`.

We extract the `openssh`, `sshd_config` and `ssh_config` from it to
minimize the changes to `.sls` files.
2020-07-31 10:54:40 +02:00
Daniel Dehennin
0b667cbcf5 fix(known_hosts): dig package does not install on Arch
The conditionnal on `ensure dig is available` does not work on Arch
since the `which` command does not exists. As the `pkg.installed`
state is idempotent, we don't need an extra check which depends on the
environment.

The `dig` utility is provided by `bind` on Arch and no more by
`bind-tools`.
2020-07-21 11:49:22 +02:00
Daniel Dehennin
7a1f6199d0 fix(jinja): encode context as json
Or with python2 the template are generated with `u'<string>'`.
2020-07-20 16:28:22 +02:00
Daniel Dehennin
cb6e48feaa feat(templates): don't get openssh pillars in templates
We pass the pillars via the template engine context, this avoid the
need to load `map.jinja` from the templates themselves and recude the
number of `pillar.get` calls.

* openssh/config.sls (sshd_config): pass `sshd_config` in the
  context.
  (ssh_config): pass `ssh_config` in the context.

* openssh/files/default/ssh_config: remove `map.jinja` import since
  it's now in the context.

* openssh/files/default/sshd_config: ditoo.

* openssh/known_hosts.sls: pass `known_hosts` in the context.

* openssh/files/default/ssh_known_hosts: use `known_hosts` from the
  context instead of calling `pillar.get` several times.

BREAKING CHANGE: Minimum Salt version support is now `2019.2` in line
with official upstream support; also use of the `traverse` Jinja filter.
2020-07-17 10:48:32 +02:00
Imran Iqbal
f6dbca3352
fix: complete PR #164
* Use consistent Jinja whitespace control `{%- ... -}`
* Improve debug output (comments & whitespace control)
* Use exact state names with TOFS `files_switch`
* Add `ssh_known_hosts_src` to `defaults` (for consistency)
* Restrict `pillar.example` changes to TOFS only
* Use `fire_banner` in `pillar.example` to indicate available template
2019-07-04 01:42:19 +01:00
nb
a47596f15a feat(TOFS): ssh sshd configs known_host and banner 2019-07-01 14:46:46 +11:00
Alexander Weidinger
66c954ed66 Set correct ssh(d)_config_group for *BSD 2017-03-04 14:20:07 +01:00
Lev Lozhkin
781be61881 Convert dig exist check to unless req 2016-07-19 13:23:48 -07:00
Simon Lloyd
daed52de19 Add sshd_config to map.jinja and check if dig command is available before installing 'dig' package. 2016-04-19 02:53:14 +02:00
Raphaël Hertzog
1b74efd2d0 Add a new openssh.known_hosts state
This state manages /etc/ssh/ssh_known_hosts and fills it with
public SSH host keys of other minions.
2015-03-26 17:50:32 +01:00