Dafydd Jones
340cc0abe7
chore(commitlint): add `{body,footer,header}-max(-line)-length` [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/265
4 anni fa
Imran Iqbal
4d49d24490
chore(gemfile+lock): update to latest gem versions (2020-W41) [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/263
4 anni fa
Imran Iqbal
094bef5406
ci(pre-commit): enable/disable `rstcheck` as relevant [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/262
4 anni fa
Dafydd Jones
4e13609b99
ci(pre-commit): add to formula [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/259
4 anni fa
semantic-release-bot
1c3a6b8ab8
chore(release): 2.0.4 [skip ci]
## [2.0.4](https://github.com/saltstack-formulas/openssh-formula/compare/v2.0.3...v2.0.4 ) (2020-09-27)
### Bug Fixes
* **pillar:** `tofs` must not be under `mine_functions` ([c0d5052
](c0d5052f6a
))
### Tests
* **inspec:** `_mapdata` files should have `tofs` configuration ([5e9033f
](5e9033f500
))
4 anni fa
Imran Iqbal
91bc8bebe4
Merge pull request #196 from baby-gnu/fix/tofs-pillars
fix(pillar): `tofs` must not be under `mine_functions`
4 anni fa
Daniel Dehennin
c0d5052f6a
fix(pillar): `tofs` must not be under `mine_functions`
The debug output of test jobs don't show the use of TOFS as it should
and the pillar.example show that `tofs` is under `mine_functions`
instead of `openssh`.
* pillar.example: move `tofs` under `openssh`.
* test/salt/pillar/default.sls: ditoo.
4 anni fa
Daniel Dehennin
5e9033f500
test(inspec): `_mapdata` files should have `tofs` configuration
4 anni fa
Imran Iqbal
9576b72eb2
chore(inspec): fix typo [skip ci]
* https://github.com/myii/ssf-formula/commit/839898aedb34
4 anni fa
semantic-release-bot
91d4b0d6ea
chore(release): 2.0.3 [skip ci]
## [2.0.3](https://github.com/saltstack-formulas/openssh-formula/compare/v2.0.2...v2.0.3 ) (2020-09-09)
### Continuous Integration
* **kitchen:** force the hostname of the containers ([208f873
](208f87380c
))
### Tests
* **inspec:** no more need to mangle mapdata for hostname ([8cb31c6
](8cb31c6967
))
* **share:** standardise structure ([15241d3
](15241d39c5
))
4 anni fa
Imran Iqbal
cf9abf5e5a
Merge pull request #195 from baby-gnu/ci/force-hostname
test(inspec): use static hostname in mapdata
4 anni fa
Imran Iqbal
15241d39c5
test(share): standardise structure
* Standardised using https://github.com/myii/ssf-formula/pull/251
4 anni fa
Daniel Dehennin
8cb31c6967
test(inspec): no more need to mangle mapdata for hostname
We force the hostname in `kitchen` so the `_mapdata` files can be
static.
4 anni fa
Daniel Dehennin
208f87380c
ci(kitchen): force the hostname of the containers
4 anni fa
semantic-release-bot
b49824b343
chore(release): 2.0.2 [skip ci]
## [2.0.2](https://github.com/saltstack-formulas/openssh-formula/compare/v2.0.1...v2.0.2 ) (2020-08-26)
### Tests
* **inspec:** display proper diff when `_mapdata` mismatch ([1c99556
](1c99556695
))
4 anni fa
Imran Iqbal
a472db6913
Merge pull request #192 from baby-gnu/test/mapdata-proper-inspec-diff
test(inspec): display proper diff when `_mapdata` mismatch
4 anni fa
Daniel Dehennin
1c99556695
test(inspec): display proper diff when `_mapdata` mismatch
The use of `eq` instead of `include` premits to have a nice diff after
the `expected/got` oneliners.
4 anni fa
semantic-release-bot
34a9c8f703
chore(release): 2.0.1 [skip ci]
## [2.0.1](https://github.com/saltstack-formulas/openssh-formula/compare/v2.0.0...v2.0.1 ) (2020-08-21)
### Bug Fixes
* **map:** `path_join` can be used only for local file access ([3845d5f
](3845d5ff61
))
4 anni fa
Javier Bértoli
27c527a172
Merge pull request #190 from baby-gnu/fix/no-path_join-for-salt-url
fix(map): `path_join` can be used only for local file access
4 anni fa
Daniel Dehennin
3845d5ff61
fix(map): `path_join` can be used only for local file access
On windows machines, the `path_join` build wrong URL by using
backslash as separator.
URL used for fileserver access must use only slashes `/`.
4 anni fa
semantic-release-bot
b32ec9819c
chore(release): 2.0.0 [skip ci]
# [2.0.0](https://github.com/saltstack-formulas/openssh-formula/compare/v1.3.1...v2.0.0 ) (2020-08-01)
### Features
* **map:** `config.get` lookups from configurable roots ([ad4385b
](ad4385b077
))
* **map:** update to v4 “map.jinja” ([df477b2
](df477b25c2
))
4 anni fa
Imran Iqbal
db67ce6f42
Merge pull request #186 from baby-gnu/feature/v4-map.jinja
feat(map): update to v4 and add config.get lookup from multiple roots
4 anni fa
Imran Iqbal
a0af21a996
chore: add breaking change message for new `map.jinja`
BREAKING CHANGE: `map.jinja` has been upgraded from using `pillar.get`
to `config.get`.
4 anni fa
Daniel Dehennin
ad4385b077
feat(map): `config.get` lookups from configurable roots
We avoid compatibility break with user pillars by looking up
configuration values using `config.get` in configurable roots.
We provide a new parameter `map_jinja:config_get_roots` in the formula
`parameters/defaults.yaml`to retrives values not only from
`tplroot=openssh` but from `sshd_config` and `ssh_config` too.
We need to update the `_mapdata` reference files to include the new
`map_jinja:config_get_roots`.
4 anni fa
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.
4 anni fa
semantic-release-bot
a8cd7370df
chore(release): 1.3.1 [skip ci]
## [1.3.1](https://github.com/saltstack-formulas/openssh-formula/compare/v1.3.0...v1.3.1 ) (2020-07-31)
### Bug Fixes
* **inspec:** use the name `_mapdata` everywhere for coherency ([14e843e
](14e843ec2b
))
4 anni fa
Imran Iqbal
94a12d86d9
Merge pull request #189 from baby-gnu/fix/rename-mapdata-test-directory
fix(inspec): use the name `_mapdata` everywhere for coherency
4 anni fa
Daniel Dehennin
14e843ec2b
fix(inspec): use the name `_mapdata` everywhere for coherency
4 anni fa
semantic-release-bot
9f3c2f2686
chore(release): 1.3.0 [skip ci]
# [1.3.0](https://github.com/saltstack-formulas/openssh-formula/compare/v1.2.2...v1.3.0 ) (2020-07-30)
### Continuous Integration
* **kitchen:** execute `_mapdata` state ([70389b5
](70389b5964
))
### Features
* **map:** generate a YAML file to validate `map.jinja` ([e4ab335
](e4ab335077
))
### Tests
* **inspec:** share library to access some minion informations ([a8d61f4
](a8d61f4307
))
* **inspec:** verify `map.jinja` dump ([0eafbd9
](0eafbd945c
))
4 anni fa
Imran Iqbal
5e2fa1a5e6
Merge pull request #187 from baby-gnu/ci/validate_map.jinja
Ci/validate map.jinja
4 anni fa
Daniel Dehennin
e4ab335077
feat(map): generate a YAML file to validate `map.jinja`
We provide a new `_mapdata` state which generate a
`/tmp/salt_mapdata_dump.yaml` to be validated by `Inspec`.
4 anni fa
Daniel Dehennin
70389b5964
ci(kitchen): execute `_mapdata` state
4 anni fa
Daniel Dehennin
0eafbd945c
test(inspec): verify `map.jinja` dump
We store validated `map.jinja` dump under the profile `files`
directory to access them with `inspec.profile.file('filename')` to
validate the content of the generated mapdata file.
The YAML files contain a value specific to each minion, its hostname,
so we use string format to expand `%{hostname}`.
The `default` inspec profile need to depends on `share` to access the
`system` and `salt_minion` libraries.
4 anni fa
Daniel Dehennin
a8d61f4307
test(inspec): share library to access some minion informations
The `system.hostname` return the result of either `hostname -s` or
`hostnamectl --static` depending of the availability of each command.
The `system.platform` return a hash with tweaked `inspec.platform`
values:
- `system.platform[:family]` provides a family name for Arch
- `system.platform[:name]` modify `amazon` to `amazonlinux`
- `system.platform[:release]` tweak for Arch and Amazon Linux:
- `Arch` is always `base-later`
- `Amazon Linux` release `2018` became `1`
- `system.platform[:finger]` is just the concatenation of the name and
the first release number (except for Ubuntu which gives `20.04` for
example)
4 anni fa
semantic-release-bot
6a882026d2
chore(release): 1.2.2 [skip ci]
## [1.2.2](https://github.com/saltstack-formulas/openssh-formula/compare/v1.2.1...v1.2.2 ) (2020-07-30)
### Bug Fixes
* **jinja:** omit_ip_address don't work on some platform ([b2d38ae
](b2d38aec9b
))
4 anni fa
Imran Iqbal
27afecb96a
Merge pull request #188 from baby-gnu/fix/omit-ip-address-on-older-platform
fix(jinja): omit_ip_address don't work on some platform
4 anni fa
Daniel Dehennin
b2d38aec9b
fix(jinja): omit_ip_address don't work on some platform
It apprears that the
`if not (omit_ip_address is sameas true or host in omit_ip_address)`
always returns `True` on older Jinja platforms:
- default-ubuntu-1604-3000-3-py2
- default-ubuntu-1604-2019-2-py3
- default-amazonlinux-1-2019-2-py2
Each part of the `or` conditional need to be surrounded by parenthesis.
4 anni fa
semantic-release-bot
156a8a2cd8
chore(release): 1.2.1 [skip ci]
## [1.2.1](https://github.com/saltstack-formulas/openssh-formula/compare/v1.2.0...v1.2.1 ) (2020-07-21)
### Bug Fixes
* **known_hosts:** dig package does not install on Arch ([0b667cb
](0b667cbcf5
))
### Continuous Integration
* **kitchen:** execute `openssh.known_hosts` state ([644e616
](644e61651d
))
### Tests
* **config_spec:** verify /etc/ssh/ssh_known_hosts ([06ef24b
](06ef24b8e1
))
4 anni fa
Imran Iqbal
9c8b77ca24
Merge pull request #185 from baby-gnu/feature/test-known_hosts
test(config_spec): verify the generation of /etc/ssh/ssh_known_hosts
4 anni fa
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`.
4 anni fa
Daniel Dehennin
644e61651d
ci(kitchen): execute `openssh.known_hosts` state
4 anni fa
Daniel Dehennin
06ef24b8e1
test(config_spec): verify /etc/ssh/ssh_known_hosts
4 anni fa
semantic-release-bot
0c064b15bf
chore(release): 1.2.0 [skip ci]
# [1.2.0](https://github.com/saltstack-formulas/openssh-formula/compare/v1.1.0...v1.2.0 ) (2020-07-20)
### Bug Fixes
* **inspec:** the package name for Arch is openssh ([6b7d8df
](6b7d8df156
))
* **jinja:** encode context as json ([7a1f619
](7a1f6199d0
))
### Features
* **ci:** update travis and kitchen to latest formula standards ([7752132
](7752132275
))
### Styles
* **libtofs.jinja:** use Black-inspired Jinja formatting [skip ci] ([9d8228d
](9d8228d9db
))
4 anni fa
Imran Iqbal
06f5f7ef2a
Merge pull request #182 from baby-gnu/feature/update-ci-to-latest-standards
feat(ci): update ci to latest standards
4 anni fa
Daniel Dehennin
6b7d8df156
fix(inspec): the package name for Arch is openssh
For Arch, Inspec define `platform[:family]` as `linux` and
`platform[:name]` as `arch`.
4 anni fa
Daniel Dehennin
7a1f6199d0
fix(jinja): encode context as json
Or with python2 the template are generated with `u'<string>'`.
4 anni fa
Daniel Dehennin
7752132275
feat(ci): update travis and kitchen to latest formula standards
Import .travis.yml and kitchen.yml from `template-formula`.
4 anni fa
Imran Iqbal
9d8228d9db
style(libtofs.jinja): use Black-inspired Jinja formatting [skip ci]
* Automated using https://github.com/myii/ssf-formula/pull/237
4 anni fa
semantic-release-bot
3c23c42171
chore(release): 1.1.0 [skip ci]
# [1.1.0](https://github.com/saltstack-formulas/openssh-formula/compare/v1.0.0...v1.1.0 ) (2020-07-17)
### Bug Fixes
* **inspec:** make rubocop happy ([2cfb5a7
](2cfb5a74f3
))
### Features
* **test:** remove serverspec files ([049db2b
](049db2bc8e
))
4 anni fa
Imran Iqbal
2d1804d7ce
Merge pull request #181 from baby-gnu/fix/make-rubocop-happy
fix(test): make rubocop happy
4 anni fa