ansible-collection-hardening/roles
schurzi 6e5621cdc9
simplify MySQL queries for user deletion (#641)
* use rowcount to determine mysql results

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

* use correct list level

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

* remove json_query

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

* remove intermediate vars

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

* add check for count

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

* drop condition, since one result must exist

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

* move rowcount in condition

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

* do loop in ansible to report each deleted user

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

* add idempotency check

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

* additional tests to verify user deletion

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

* actually iterate the whole user list when deleting

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

* fix tests for SuSE

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

* adopt suggestions

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

---------

Signed-off-by: Martin Schurz <Martin.Schurz@t-systems.com>
2023-03-01 14:19:50 +01:00
..
apache_hardening@41bd7d7e9d move to collections 2020-11-07 21:19:43 +01:00
mysql_hardening simplify MySQL queries for user deletion (#641) 2023-03-01 14:19:50 +01:00
nginx_hardening linting (#603) 2023-01-24 12:40:27 +01:00
os_hardening Only skip audit restart handler in docker (#637) 2023-02-15 17:58:52 +01:00
ssh_hardening Rewrite system account detection and hardening and create tests (#621) 2023-01-27 11:01:03 +01:00
windows_hardening@41e8a1893c move to collections 2020-11-07 21:19:43 +01:00