Commit Graph

70 Commits

Author SHA1 Message Date
Kevin Fenzi
9d22211952 basessh: remove rhel7 stuff and clean up template
This should largely have no effect, but makes things easiler to
follow/read. We have 0 rhel7 instances left so removing all those
conditionals.

Also, rename the sshd_config teplate to be .j2 like all our other
templates.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-07-16 11:57:10 -07:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
Ryan Lerch
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Kevin Fenzi
51811f894d basessh: fix sign_hostnames to use correct variable expansion (i hope)
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:51:24 -08:00
Kevin Fenzi
9259cb1ead basessh: change empty list to not use quotes
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:46:29 -08:00
Kevin Fenzi
61ebb2f958 basessh: remove singlequotes
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:43:21 -08:00
Kevin Fenzi
da8ef971ee basessh: inner variable no longer needs escaped
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:33:26 -08:00
Kevin Fenzi
25914510c1 basessh: try and move the variable expansion out to the addition
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:28:06 -08:00
Kevin Fenzi
7e40030b01 Revert "basessh: try and filter out the empty list element"
This reverts commit 91db9425bc.
2022-11-19 10:18:04 -08:00
Kevin Fenzi
91db9425bc basessh: try and filter out the empty list element
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 10:13:31 -08:00
Kevin Fenzi
4cdee4e355 basessh: try and check path in renew path too
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-19 09:51:06 -08:00
Kevin Fenzi
60f6342682 basessh: try and only act on items with a /etc/ssh path
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-18 21:53:39 -08:00
Kevin Fenzi
a7f25f1662 basessh: see if we can just fail fetching missing files
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-18 10:21:55 -08:00
Kevin Fenzi
b2dbfba711 basessh: revert back
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-18 10:15:08 -08:00
Kevin Fenzi
1c740ec365 basessh: try setting empty fact another way
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-18 10:13:11 -08:00
Kevin Fenzi
7747b40c82 basessh: try and not add initial empty fact
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2022-11-18 10:11:14 -08:00
Kevin Fenzi
925f314af5 basessh: see if we can generate a sha256 cert
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-11-03 15:04:51 -08:00
Kevin Fenzi
88e27098a3 basessh: simplify when conditional
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:18 +02:00
Peter Robinson
c0e2e1dbe9 basessh: fix up check for libselinux python OS version chceks 2020-04-24 21:34:14 +02:00
Kevin Fenzi
d535829453 basessh: fix up logic for el8 machines.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
2eb26dd5f9 basessh: carefully adjust install so it only fixes rhel8 and changes nothing else for freeze.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:13 +02:00
Kevin Fenzi
81fb4582e7 ansible: change when conditions to use == instead of is when checking strings.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Kevin Fenzi
e4222545c1 basessh: Did ansible variable handling change on us?
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Kevin Fenzi
b3197a473f basessh: can drop this section now too.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Karsten Hopp
c9ed62ac32 update ansible_distribution_major_version conditionals
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2020-04-24 21:34:10 +02:00
Kevin Fenzi
27929fa58b basessh: Always run the keygen shell command if needed, even in check mode.
Without this check mode will fail if there's not an old signed copy of the key around.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Kevin Fenzi
812c4c0f0d basessh: set the delegate here to localhost
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-07-01 18:18:03 +00:00
Kevin Fenzi
3ed359e343 basessh: do not set python2 here, it should be autodetected.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-07-01 18:06:09 +00:00
Kevin Fenzi
d74c28a2c8 basessh: try and set /usr/bin/python for the delegations to batcave01 for python3 using hosts.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-06-16 20:01:10 +00:00
Karsten Hopp
a713ec2e71 basessh: dnf -> package 2019-06-11 14:55:11 +00:00
Stephen Smoogen
309677ee8a try to figure out which of the identical named jobs arent working on grobisplitter 2019-06-01 17:48:43 +00:00
Mikolaj Izdebski
3cedc1366b basessh: Fix libselinux-python installation on Fedora >= 31 2019-04-11 15:24:49 +02:00
Mikolaj Izdebski
6680b25ef8 basessh: Fix conditionals for installing libselinux-python 2019-04-11 15:18:39 +02:00
Kevin Fenzi
321c458292 basessh: switch fedora to use dnf here (since package wants dnf-2)
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-04-08 20:59:29 +00:00
Patrick Uiterwijk
4f3c609815 basessh: Migrate sshd config to single template and strengthen ciphers
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
2019-04-08 18:51:31 +02:00
Kevin Fenzi
76789fc3be basessh: Fedora 30 also has no python3 version of libselinux, add conditionals.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-03-28 16:10:09 +00:00
Kevin Fenzi
abff8931f9 basessh: adjust for package names in rhel8beta
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-02-12 22:14:49 +00:00
Rick Elrod
f3a72d1039 remove all instances of bkernel01/02
Signed-off-by: Rick Elrod <relrod@redhat.com>
2018-08-22 21:15:17 +00:00
Patrick Uiterwijk
350110f769 Only run date once
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-08-20 17:35:01 +00:00
Patrick Uiterwijk
dcc9aa15d2 Use a date pipe lookup, since sometime ansible_date_Time seems to be undefined...
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-08-20 17:33:42 +00:00
Patrick Uiterwijk
7cce79de07 Also integer-ize the epoch
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-08-16 17:42:17 +00:00
Patrick Uiterwijk
b35d4402e1 Try to convert this string to int
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-08-16 17:40:59 +00:00
Patrick Uiterwijk
9b48361d76 Do the loop
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
2018-08-16 17:39:55 +00:00