Commit graph

27 commits

Author SHA1 Message Date
schurzi
69ab9e47ad
Update Debian compatibility (#784)
* Update Ubuntu compatability

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* reload systemd when disabling ssh socket

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* manage systemd files

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Create privsep directory for Debian

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Use working Ubuntu 24.04 image for vm tests

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

* Remove deprecated Debian 10

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>

---------

Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2024-08-06 13:11:32 +02:00
Sebastian Gumprich
85aa1b22b3
do not force type of ssh_gateway_ports (#765)
* do not force type of gatewayports-var

this way it can be a bool or a string. we also now test for it

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

* replace yum with dnf

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>

---------

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2024-05-31 12:20:00 +02:00
Martin Schurz
422fb940a9 manually fix remaining problems
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-12-06 15:27:21 +01:00
Martin Schurz
7e33ea0bae use ansible-lint to autofix problems
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-12-06 14:37:09 +01:00
Martin Schurz
e00716df62 fix lint findings
Signed-off-by: Martin Schurz <Martin.Schurz@telekom.de>
2023-12-06 11:36:08 +01:00
Martin Schurz
31c9885610 use docker for inspec-auditor
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-04-10 23:22:41 +02:00
Martin Schurz
4a9d6033eb try docker for inspec-auditor
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-04-10 23:04:46 +02:00
Martin Schurz
ebab98930c try docker for inspec-auditor
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-04-10 22:58:28 +02:00
Martin Schurz
dd5ad568b3 fix deprecation warnings
Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-04-10 20:36:03 +02:00
schurzi
5ed3f399f2
add check mode to molecule tests (#644)
* add check mode to molecule tests

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* bail on undefined variables

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* bail on undefined variables

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* execute tasks in check mode

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix error in check mode on SuSE

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* use when condition on task

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

---------

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-03-09 09:37:59 +01:00
Sebastian Gumprich
c2e9c9a8dd
try to fix molecule local tests (#632)
these settings are probably not necessary (geerlingguys images dont have them either)

Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-02-06 14:01:40 +01:00
Sebastian Gumprich
fa2e90c6f2 mount cgroup rw, as suse seems to need it
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-01-23 15:59:06 +01:00
Sebastian Gumprich
ed1cb1c2a7 add cgroupns: host mode to molecule
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-01-23 15:59:06 +01:00
Sebastian Gumprich
a0d11faa8a Fixed problems with running molecule locally with cgroup v2
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-01-23 15:59:06 +01:00
Sebastian Gumprich
142782bad6 add diff to molecule
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2023-01-19 13:46:16 +01:00
schurzi
c1cd6c5ac3
change default to allow SFTP (#564)
* change default to allow SFTP

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* diasble sftp for default tests

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* extend documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix typo

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* correct ssh version

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-08-22 10:03:37 +02:00
schurzi
a806ec8598
add posibility to run ssh_hardening as unprivileged user (#561)
* add VM tests for ssh_hardening

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* remove VM tests from ssh_hardening

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* run ssh_hardening test as unprivileged user

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add link for documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* use different config

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* remove become

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* re-add become

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move become into role

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* indentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* try args apply

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix linting

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2022-08-15 13:19:07 +02:00
Sebastian Gumprich
9b50392d8a fix linting
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2022-07-07 16:12:06 +02:00
René Scheibe
0609cf729a Improve installing packages on Arch Linux
This prevents annoying task errors (even though they are ignored)
when testing on non-Arch distributions.

Running the "prepare" command, this was always visible:
> fatal: [instance]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"pacman\" in paths: /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin"}

Signed-off-by: René Scheibe <rene.scheibe@gmail.com>
2021-11-07 13:53:03 +01:00
Sina Tak Tehrani
5debcc0c6f
fix filter error in ansible.builtin.file mode parameter (#486)
* fix filter error in ansible.builtin.file mode parameter

* Change cinc supermarket

* fix link to baseline

* fix typo

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2021-10-18 20:55:24 +02:00
rndmh3ro
6c80de270b remove molecule linting, because it has own action now
Signed-off-by: rndmh3ro <github@gumpri.ch>
2021-08-15 20:16:56 +02:00
schurzi
2882a15ee1
Merge pull request #427 from dev-sec/snoopotic-fix/add_auditd_restart_handler
add restart-auditd handler after configuration change
2021-03-29 21:15:46 +02:00
Sebastian Gumprich
458dfa2b6a use cinc exec supermarket instead of github
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2021-03-29 16:16:03 +02:00
Sebastian Gumprich
6c805f6ca9 add support for using a proxy to test with molecule
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2021-03-19 15:52:19 +01:00
Sebastian Gumprich
8cb6732882 add support for using a proxy to test with molecule
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
2021-03-19 15:45:06 +01:00
schurzi
a75e2c028b
change inclusion of os specific defaults (#353)
* change inclusion of os specific defaults

we now include the os specific options into a separate variable and
merge this with the default ansible namespace, when the corresponding
keys do not already exist (eg. are defined by default oder by user)

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* simplify check for os specific variables

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add test for variable override

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move tests to verify stage

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* correct grep

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* linting

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix typo

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* Revert "Merge pull request #351 from sprat/fix-umask"

This reverts commit 9e8e0bc8fb, reversing
changes made to 98c7553016.

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move immutable ssh vars to internal vars

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* move vars to OS files

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* change default handling for all roles

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* fix issues

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* add documentation

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>

* Update main.yml

Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
2020-12-20 20:46:57 +01:00
Sebastian Gumprich
ac3c12d264 move to collections 2020-11-07 21:19:43 +01:00