Skip to content

Conversation

@gchappel
Copy link
Contributor

@gchappel gchappel commented Sep 2, 2025

Description

Avoid logging the value of the token by removing it from the command line (which Ansible will output on failure) and into an environment variable (which will not be logged).

Fixes: #240

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Small minor change not affecting the Ansible Role code (Github Actions Workflow, Documentation etc.)

How Has This Been Tested?

Unix tasks were tested via running my company workflows with and without this fix and hide_sensitive_logs: false, knowing that due to #238 I would see the registration command fail.

Without the fix, the token was logged, with the fix the token was not logged.

Unfortunately the Windows tasks have not been tested - I don't have any Ansible Windows hosts configured so nothing to run them against. This seems like relatively basic/core functionality so I don't see there being behavioural differences in them, but I can't guarantee.

@MonolithProjects MonolithProjects added the bug Something isn't working label Dec 20, 2025
@MonolithProjects MonolithProjects self-assigned this Dec 20, 2025
Copy link
Owner

@MonolithProjects MonolithProjects left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@MonolithProjects MonolithProjects merged commit 31debf1 into MonolithProjects:master Dec 20, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: use environment variables instead of --token

2 participants