Commit graph

29 commits

Author SHA1 Message Date
Jakub Jelen
6e3257736e Rename handlers to start with sshd_ prefix
The documentation says there is only one global scope for handlers:

> There is only one global scope for handlers (handler names and listen topics)
> regardless of where the handlers are defined. This also includes handlers
> defined in roles.

So following the naming convention as we do in all the other variables
sounds like a good idea.

https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_handlers.html

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2024-12-19 11:33:26 +01:00
Jakub Jelen
fcb09ccaa9 Restart the service when needed
Some changes, such as sysconfig change, requires the service to be
restarted.

Fixes: #302

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2024-12-19 11:33:26 +01:00
Matt Willsher
d4eae954c1
feat: Ubuntu noble (#290)
* feat: Add support for Ubuntu Nobel/24.04 LTS
* fix: Add missing PrintMotd to Ubuntu 22.04
* fix(tests): Various linting fixes

---------
Co-authored-by: Jakub Jelen <jjelen@redhat.com>
2024-06-21 09:12:02 +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
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
Steffen Scheib
6819be90d3 - Adding support for OpenWrt 21.03 2022-09-24 21:42:01 +02:00
Matt Willsher
90338a3f0a Fix various linting issues 2022-06-03 11:22:17 +01:00
Jakub Jelen
c1d1cdfeac Reuse the list of skipped virtualization environments 2022-04-19 17:20:27 +02:00
Jakub Jelen
09f2c6a999 Add another virtualization platform exception
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2022-04-19 17:20:27 +02:00
Jakub Jelen
8e180cfb48 Add new identification for Github Actions virtualization platform 2021-06-01 16:09:23 +02:00
Noriko Hosoi
6887864d2c Fix issues found by linters - enable all tests on all repos - remove suppressions
Cleaning up yamllint errors.
  - Use .yamllint.yml and .yamllint_defaults.yml instead of
    .yamllint.yaml.
  - Fix the invalid indentations.

Cleaning up ansible-lint errors.
  - Add "name" to every task.
  - Use command rather than shell
  - Add "changed_when: false".
  - Use '|' instead of '>' for the shell module.
  - Fix '/bin/sh: line 3: CRYPTO_POLICY: unbound variable'.
  - Add "set -eu" and "set -o pipefail" if pipefail is available.
    Note: "pipefail" is not available in "sh" and "dash".
  - Add "- '306'  # Shells that use pipes should set the pipefail option"
    to .ansible-lint since ansible-lint does not recognize it if it's set
    in "if set -o | grep pipefail".

RHELPLAN-73804
2021-04-09 10:27:42 -07:00
Jakub Jelen
48dc56b2d2 Recognize podman container runtime and ignore services there 2020-12-11 13:25:19 +01:00
Jakub Jelen
634d87490e Exclude service commands in Github Action CI 2020-11-06 11:35:10 +01:00
Jakub Jelen
9e7eae712d Reformat yaml files to avoid wrong indentation, trailing spaces and long lines 2020-09-23 14:49:42 +02:00
Martin Verges
fb530596cd clean up for ansible-lint 2019-11-06 20:36:36 +01:00
Matt Willsher
a9354934ee
Merge pull request #112 from d-little/aix-support
AIX support (including new AIX handler)
2019-07-10 19:35:34 +01:00
David Little
53a89b677e AIX support for role (including new AIX handler) 2019-07-10 12:07:07 -05:00
Nikolaos Kakouros
b81977c659 Merge branch 'master' into syntax 2019-06-04 11:48:02 +02:00
Matt Willsher
3f7db475ce Add bool to handler 2019-05-23 20:38:31 +01:00
Janne Blomqvist
d438f096a7 Make role work with chroot connections on EL 7.
For chroot connection (e.g. when building images instead of working on
live hosts) one cannot restart services etc.

Also due to Ansible bug 21026 one must run systemctl instead of using
the service module, limiting support to EL 7 for the time being.
2018-09-11 16:10:58 +03:00
Nikolaos Kakouros
10f94a1f05 Updates syntax to Ansible 2.7 era 2018-09-08 10:13:51 +02:00
Dan Čermák
a257ae7317 Fix for ansible_virtualization_type not defined in Ansible > 2.5
ansible_virtualization_type is undefined in Ansible > 2.5 when no virtualization
is used. A jinja2 filter has been added that provides a default value (None) so
that the check does not fail
2018-04-24 11:32:55 +02:00
Nikolaos Kakouros
9bddc29284 Makes handler use listen: 2017-09-06 16:20:00 +02:00
Matt Willsher
43ed7c19a2 Fix Ansible 2.3 warnings 2017-05-04 14:31:26 +01:00
Matt Willsher
812a1e1267 Fix issues raised in #22 2015-06-28 10:18:45 +01:00
jitakirin
d0b2b029a1 Verify SSHd config early
This uses the validate option to check the config file early, which
avoids putting bad settings in place at all, and also enables a
fail-fast behaviour (errors out when processing the template module).
2015-06-26 11:38:09 +01:00
Matt Willsher
964496fcd1 Allow reload to be skipped 2015-01-13 17:42:10 +00:00
Matt Willsher
7ef39b761f Naming tidy up 2015-01-13 13:26:52 +00:00
Matt Willsher
220a5cdb54 Initial commit 2014-12-18 22:12:51 +00:00