Skip to content

Conversation

@opserve-menno
Copy link

This is pull request #229 with some additional fixes.

This includes a workaround for Salt's selinux.fcontext_policy_present state and makes sure we replace the 2FA code if updated in the pillar.

@opserve-menno opserve-menno self-assigned this May 12, 2023
@opserve-menno
Copy link
Author

This shouldn't be merged without a good review and some additional testing.

selinux.fcontext_policy_present only works once, if the policy is
already present the salt state errors, add an unless statement to
check if the policy is already in place.

Error:
  ----------
            ID: users_googleauth_selinux_present
      Function: selinux.fcontext_policy_present
          Name: /etc/google_authenticator.d(/.*)?
        Result: False
       Comment: Error adding new rule: {'pid': 10389, 'retcode': 1, 'stdout': '', 'stderr': 'ValueError: File context for /etc/google_authenticator.d(/.*)? already defined'}
       Started: 07:14:38.736705
      Duration: 609.271 ms
       Changes:
When we set replace to false we only generate an initial config and
changes to the pillar are never applied, set replace to true to fix
this.
@opserve-menno opserve-menno merged commit 15c698f into master Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants