* add check mode to molecule tests
Signed-off-by: Martin Schurz <[email protected]>
* bail on undefined variables
Signed-off-by: Martin Schurz <[email protected]>
* bail on undefined variables
Signed-off-by: Martin Schurz <[email protected]>
* execute tasks in check mode
Signed-off-by: Martin Schurz <[email protected]>
* fix error in check mode on SuSE
Signed-off-by: Martin Schurz <[email protected]>
* use when condition on task
Signed-off-by: Martin Schurz <[email protected]>
---------
Signed-off-by: Martin Schurz <[email protected]>
* use rowcount to determine mysql results
Signed-off-by: Martin Schurz <[email protected]>
* use correct list level
Signed-off-by: Martin Schurz <[email protected]>
* remove json_query
Signed-off-by: Martin Schurz <[email protected]>
* remove intermediate vars
Signed-off-by: Martin Schurz <[email protected]>
* add check for count
Signed-off-by: Martin Schurz <[email protected]>
* drop condition, since one result must exist
Signed-off-by: Martin Schurz <[email protected]>
* move rowcount in condition
Signed-off-by: Martin Schurz <[email protected]>
* do loop in ansible to report each deleted user
Signed-off-by: Martin Schurz <[email protected]>
* add idempotency check
Signed-off-by: Martin Schurz <[email protected]>
* additional tests to verify user deletion
Signed-off-by: Martin Schurz <[email protected]>
* actually iterate the whole user list when deleting
Signed-off-by: Martin Schurz <[email protected]>
* fix tests for SuSE
Signed-off-by: Martin Schurz <[email protected]>
* adopt suggestions
Signed-off-by: Martin Schurz <[email protected]>
---------
Signed-off-by: Martin Schurz <[email protected]>
* add verify-task to check if mysql is running and enabled
Signed-off-by: Sebastian Gumprich <[email protected]>
* Update molecule/mysql_hardening/verify_tasks/service.yml
Co-authored-by: schurzi <[email protected]>
Signed-off-by: Sebastian Gumprich <[email protected]>
Co-authored-by: schurzi <[email protected]>
* [mysql_hardening] Allow setting the mysql_distribution
On some operating systems, the package for MySQL is not `mysql-server`,
and so the default check for this will not yield the correct result.
This change adds an escape hatch by letting the user set
`mysql_distribution`. Additionally, it verifies that it is set to a
legal value if the user has set it.
Closes#472
Signed-off-by: Shawn Wilsher <[email protected]>
* Update roles/mysql_hardening/tasks/main.yml
Co-authored-by: Sebastian Gumprich <[email protected]>
when our collection is used with tags, the os dependent variables are
not resolved. This task should run every time, so the behaviour is
correct.
Signed-off-by: Martin Schurz <[email protected]>
* added version check for MariaDB in Query
MariaDB Uses the authentication_string field since 10.4.0, added this in version check in query for users to delete
Signed-off-by: Martin Neubert <[email protected]>
* Update roles/mysql_hardening/tasks/mysql_secure_installation.yml
Co-authored-by: Sebastian Gumprich <[email protected]>
* Update roles/mysql_hardening/tasks/mysql_secure_installation.yml
Co-authored-by: Sebastian Gumprich <[email protected]>
Co-authored-by: Sebastian Gumprich <[email protected]>
Signed-off-by: Sebastian Gumprich <[email protected]>
install collection in molecule
Signed-off-by: Sebastian Gumprich <[email protected]>
remove deprecated ubuntu 16.04 from tests
Signed-off-by: Sebastian Gumprich <[email protected]>
Ansible does not work with FQCN and collections sepcified for including
roles. It is currently expecting to only get the role name in this
context.
Verified with Ansible 2.10.5
Signed-off-by: Martin Schurz <[email protected]>
* make wrong password fail task
Signed-off-by: Sebastian Gumprich <[email protected]>
* add name to fail task
Signed-off-by: Sebastian Gumprich <[email protected]>
* add restart handler variable for mysql role
Signed-off-by: Sebastian Gumprich <[email protected]>
* add prettierignore file to ignore CHANGELOG
Signed-off-by: Sebastian Gumprich <[email protected]>
* 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 <[email protected]>
* simplify check for os specific variables
Signed-off-by: Martin Schurz <[email protected]>
* add test for variable override
Signed-off-by: Martin Schurz <[email protected]>
* move tests to verify stage
Signed-off-by: Martin Schurz <[email protected]>
* correct grep
Signed-off-by: Martin Schurz <[email protected]>
* linting
Signed-off-by: Martin Schurz <[email protected]>
* fix typo
Signed-off-by: Martin Schurz <[email protected]>
* Revert "Merge pull request #351 from sprat/fix-umask"
This reverts commit 9e8e0bc8fb, reversing
changes made to 98c7553016.
Signed-off-by: Martin Schurz <[email protected]>
* move immutable ssh vars to internal vars
Signed-off-by: Martin Schurz <[email protected]>
* move vars to OS files
Signed-off-by: Martin Schurz <[email protected]>
* change default handling for all roles
Signed-off-by: Martin Schurz <[email protected]>
* fix issues
Signed-off-by: Martin Schurz <[email protected]>
* add documentation
Signed-off-by: Martin Schurz <[email protected]>
* Update main.yml
Co-authored-by: Sebastian Gumprich <[email protected]>