Commit graph

590 commits

Author SHA1 Message Date
Rich Megginson
24c1915595 tests: Ensure backup/restore preserves file attributes
I noticed some test failures in tests that check ownership/permissions
of config files.  The tests were recently changed to reuse the same
VM, so I suspect config files were not being backed up/restored with
the correct file attributes.  Use `cp -a` to preserve all file
attributes.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-11-17 08:28:26 -07:00
Jakub Jelen
350a0e562b
fix: Avoid creation of runtime directories in home (#265) 2023-10-30 13:27:37 +00:00
Matt Willsher
7d50893deb
docs(changelog): version v0.22.0 [citest skip] (#263)
Update changelog and .README.html for version v0.22.0

Signed-off-by: Matt Willsher <matt@monki.org.uk>
2023-10-18 11:18:51 +01:00
Matt Willsher
59ee0c9715
fix: Remove recursive loop created by symlink of entire role (#262) 2023-10-17 07:30:46 +01:00
Sergei Petrosian
9a3aa1adb9
docs(changelog): version v0.21.0 [citest skip] (#255) 2023-09-13 14:42:01 +01:00
EmyLIEUTAUD
0bc6d8f40b
feat: manage ssh certificates (#252)
* Role configured to accept SSH connection via SSH certificates
* Works with or without principals and ansible-lint updated
* add test for SSH certificates authentication with principals
* Add configuration to run tests for SSH certificates authentication with principals
* tasks to use SSH certificates grouped into one file
* Update README.md
2023-09-11 14:39:03 +01:00
Matt Willsher
d54f51f32a
Merge pull request #254 from willshersystems/dependabot/github_actions/actions/checkout-4
build(deps): bump actions/checkout from 3 to 4
2023-09-06 09:12:56 +01:00
dependabot[bot]
65cb76028f
build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 12:23:27 +00:00
Sergei Petrosian
1e308d69ba Use sshd_<OptionName> in varname for clarity 2023-08-29 15:29:17 +02:00
Sergei Petrosian
631a90ffcc Fix task name for updating git 2023-08-29 15:29:17 +02:00
Sergei Petrosian
a6073c4ce3 Apply latest changes for README conversion
* Remove badges from README.md prior to converting to HTML
* Replace Commitlint with PR Title Lint
* Lint all markdown files except for CHANGELOG.md not just README.md
* Use woke form from linux-system-roles
2023-08-29 15:29:17 +02:00
Sergei Petrosian
625b74a2cc ci: Add markdownlint, test_converting_readme, and build_docs workflows
* markdownlint runs against README.md to avoid any issues with
  converting it to HTML
* test_converting_readme converts README.md > HTML and uploads this test
  artifact to ensure that conversion works fine
* build_docs converts README.md > HTML and pushes the result to the
  docs branch to publish dosc to GitHub pages site
2023-08-29 15:29:17 +02:00
Nikolaos Kakouros
d6abe9c032 fix: make runtime dir relative 2023-08-29 13:01:42 +02:00
Markus Linnala
66785690fa Support inject_facts_as_vars = false
Use facts via ansible_facts only.

Made using:
  git ls-files -z|grep -z yml|xargs -0r sed --follow-symlinks -Ei \
    "s/ansible_(virtualization_type|os_family|distribution\w*)/ansible_facts['\1']/g"
2023-08-29 12:40:48 +02:00
Markus Linnala
29efda347b Drop "ansible" from variable names
Keep ansible variable namespace for upstream only.
2023-08-29 12:40:48 +02:00
Richard Megginson
729a1b010f
Merge pull request #248 from spetrosi/ignore-no-role-prefix
ci: Ignore var-naming[no-role-prefix] ansible-lint rule that fails expectedly
2023-08-15 08:44:48 -06:00
Sergei Petrosian
34be8e5ea3 Ignore [no-role-prefix] ansible-lint rule that fails expectedly 2023-08-15 16:08:55 +02:00
Matt Willsher
a31277ae5a
Merge pull request #243 from maage/fedora-31-eol 2023-08-08 12:46:34 +01:00
Markus Linnala
fa19ba9abe drop support of Fedora 31, EOL 2020-11-24 2023-08-05 12:49:02 +03:00
Richard Megginson
546b70fab6
Merge pull request #242 from richm/fix-changelog-header
chore: fix markdown for heading in CHANGELOG
2023-06-20 10:08:59 -06:00
Rich Megginson
fa3792c1b7 chore: fix markdown for heading in CHANGELOG
There was no markdown h2 heading for the 0.18.2 release which
broke the changelog parser in the collection release, causing
the changelog to look like
0eade02032 (diff-ddbe2c1474f5ea331aef8eedcd595299f771578e4416a5f112ae69ed5a934bc0R4)
Add the correct markdown

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-06-20 09:44:55 -06:00
Matt Willsher
7203f77a76
Merge pull request #241 from spetrosi/new-ver 2023-06-19 16:23:22 +01:00
Sergei Petrosian
9c811ad721 docs(changelog): version v0.20.0 [citest skip]
Create changelog update and release for version v0.20.0

Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
2023-06-19 15:16:14 +02:00
Matt Willsher
807c1d7758
Merge pull request #238 from domrim/debian-updates 2023-06-19 06:46:11 +01:00
Dominik Rimpf
70c913ed0e
feat: support for debian 12 2023-06-18 23:10:14 +02:00
Dominik Rimpf
4ba6ca1a80
fix: debian 11 defaults 2023-06-15 17:18:41 +02:00
Jakub Jelen
039aa32606 feat: Add missing configuration options available in Match block
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2023-06-15 15:56:48 +02:00
Jakub Jelen
484da0584b feat: Add new options from OpenSSH 9.3
This version is now available in Alpine.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2023-06-15 15:56:48 +02:00
Sergei Petrosian
1a7d995b96 ci: Add pull request template and run commitlint on PR title only
We now ensure the conventional commits format only on PR titles and not
on
commits to let developers keep commit messages targeted for other
developers
i.e. describe actual changes to code that users should not care about.
And PR titles, on the contrary, must be aimed at end users.

For more info, see
https://linux-system-roles.github.io/contribute.html#write-a-good-pr-title-and-description
2023-06-15 11:33:51 +02:00
Sergei Petrosian
9f26414a37 Move commitlint.config.js to hidden .commitlintrc.js 2023-06-15 11:33:51 +02:00
Dominik Rimpf
b7bf1ec02d chore: moved debian 7 (wheezy) config to explicit file 2023-06-15 11:32:48 +02:00
Stefan Weber
0aea603673 separate failing test for Fedora / RHEL
due to difference in
Subsystem sftp /usr/libexec/openssh/sftp-server (RHEL)
Subsystem sftp /usr/libexec/sftp-server (Fedora)
2023-05-04 16:21:56 +02:00
Stefan Weber
742a88e3c6 fix subsystem test for RHEL > 8 2023-05-04 16:21:56 +02:00
Stefan Weber
75760559a8 proper Subsystem sftp default
(same for RHEL6/7/8)
2023-05-04 16:21:56 +02:00
Richard Megginson
9a6ad4e5f8
Merge pull request #234 from richm/cl-20230427
docs(changelog): version v0.19.0
2023-04-28 07:49:13 -06:00
Rich Megginson
b1ec052b39 docs(changelog): version v0.19.0
changelog for release v0.19.0
2023-04-27 19:11:51 -06:00
Matt Willsher
4c629407d7
Merge pull request #233 from richm/firewall-platform-support 2023-04-27 08:33:54 +01:00
Matt Willsher
f4336527fa
Merge pull request #231 from spetrosi/commitlint-gh-action 2023-04-27 08:33:32 +01:00
Rich Megginson
a2921b9dc1 test: skip selinux or firewall role test where not supported
Do not test with selinux or firewall if the platform does not support
those roles.
2023-04-26 16:11:18 -06:00
Richard Megginson
a36faf9309
Merge pull request #232 from richm/check_fingerprint
test: check generated files for ansible_managed, fingerprint
2023-04-26 10:01:31 -06:00
Rich Megginson
c5c519f73b test: check generated files for ansible_managed, fingerprint
Add the following files: tests/tasks/check_header.yml and
tests/templates/get_ansible_managed.j2.
Use check_header.yml to check generated files for the ansible_managed
and fingerprint headers.
check_header.yml takes these parameters.  `fingerprint` is required,
and one of `__file` or `__file_content`:

* `__file` - the full path of the file to check e.g. `/etc/realmd.conf`
* `__file_content` - the output of `slurp` of the file
* `__fingerprint` - required - the fingerprint string `system_role:$ROLENAME` e.g.
  `__fingerprint: "system_role:postfix"`
* `__comment_type` - optional, default `plain` - the type of comments used

e.g. `__comment_type: c` for C/C++-style comments.  `plain` uses `#`.
See https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html#adding-comments-to-files
for the different types of comment styles supported.

Example:
```
- name: Check generated files for ansible_managed, fingerprint
  include_tasks: tasks/check_header.yml
  vars:
    __file: /etc/myfile.conf
    __fingerprint: "system_role:my_role"
```

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-04-26 07:52:03 -06:00
Sergei Petrosian
3f17eeaf61 ci: Add commitlint GitHub action to ensure conventional commits
linux-system-roles move to using the conventional commits format to
automate collecting changelog and release notes, and automate
identifying version of releases.

For more information, see
- General conventional commits specs in
https://www.conventionalcommits.org/en/v1.0.0/,
- Conventional Commits format in system roles' Contribute
https://linux-system-roles.github.io/contribute.html#conventional-commits-format
2023-04-26 12:05:04 +02:00
Jakub Jelen
2e3e4a29b5 ci: Drop testing on Debian stretch (9)
This version is EOL since last year and various failures happen.

Fixes: #228
2023-04-26 10:09:06 +02:00
Matt Willsher
638e76cf64
Merge pull request #229 from Jakuje/indent
Make sure the list options are correctly indented
2023-04-19 19:52:05 +01:00
Jakub Jelen
a3065d070c Make sure the list options are correctly indented
Inspired by similar issue reported and fixed in ssh client role
https://github.com/linux-system-roles/ssh/pull/80/

This wont work in RHEL6 (not allowed AcceptEnv in match blocks) so just
skip it here.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2023-04-14 19:01:19 +02:00
Richard Megginson
ebf18bd8cd
Merge pull request #227 from richm/bsd
BSD: define __sshd_packages
2023-04-14 07:33:42 -06:00
Richard Megginson
6ede6a2c7b
Merge pull request #225 from willshersystems/dependabot/github_actions/mathieudutour/github-tag-action-6.1
Bump mathieudutour/github-tag-action from 6.0 to 6.1
2023-04-14 07:33:24 -06:00
Rich Megginson
1d689ed992 BSD: define __sshd_packages 2023-04-13 16:32:37 -06:00
Matt Willsher
e84617d70e
Merge pull request #224 from willshersystems/dependabot/github_actions/actions/checkout-3 2023-04-12 12:59:21 +01:00
dependabot[bot]
c165ae5c61
Bump mathieudutour/github-tag-action from 6.0 to 6.1
Bumps [mathieudutour/github-tag-action](https://github.com/mathieudutour/github-tag-action) from 6.0 to 6.1.
- [Release notes](https://github.com/mathieudutour/github-tag-action/releases)
- [Commits](https://github.com/mathieudutour/github-tag-action/compare/v6.0...v6.1)

---
updated-dependencies:
- dependency-name: mathieudutour/github-tag-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-11 15:35:48 +00:00