Commit graph

599 commits

Author SHA1 Message Date
Jakub Jelen
793cca4c97 ci: Add missing requirements
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2024-01-22 16:41:33 +01:00
Jakub Jelen
d3e3bdce5a Add whitespace around the filter symbol
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2024-01-22 16:41:33 +01:00
Richard Megginson
32b892c3e3
Merge pull request #272 from richm/ansible-lint-test-2.16
ci: Use supported ansible-lint action; run ansible-lint against the collection
2024-01-08 11:15:12 -07:00
Rich Megginson
a25523ddce ci: Use supported ansible-lint action; run ansible-lint against the collection
The old ansible-community ansible-lint is deprecated.  There is a
new ansible-lint github action.

The latest Ansible repo gating tests run ansible-lint against
the collection format instead of against individual roles.
We have to convert the role to collection format before running
ansible-test.

This also requires tox-lsr 3.2.1

Role developers can run this locally using
`tox -e collection,ansible-lint-collection`
See https://github.com/linux-system-roles/tox-lsr/pull/125

Fix ansible-lint and ansible-test issues reported by the
latest 2.16 versions.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2024-01-08 10:56:53 -07:00
Richard Megginson
f1c1f524c2
Merge pull request #271 from richm/cl-20231129
docs(changelog): version v0.23.0 [citest skip]
2023-11-30 08:19:05 -07:00
Rich Megginson
9ede1638f9 docs(changelog): version v0.23.0 [citest skip]
Update changelog and .README.html for version v0.23.0

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-11-29 17:53:57 -07:00
Richard Megginson
195cb2ead6
Merge pull request #270 from richm/ostree
feat: support for ostree systems
2023-11-29 07:06:04 -07:00
Rich Megginson
4543f0c679 feat: support for ostree systems
Feature: Allow running and testing the role with ostree managed nodes.

Reason: We have users who want to use the role to manage ostree
systems.

Result: Users can use the role to manage ostree managed nodes.
Signed-off-by: Rich Megginson <rmeggins@redhat.com>
2023-11-28 09:40:18 -07:00
Richard Megginson
e54fca52c7
Merge pull request #269 from richm/test-backup-restore-preserve-file-attrs
tests: Ensure backup/restore preserves file attributes
2023-11-20 07:40:11 -07:00
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