Skip to content

Conversation

gchappel
Copy link

@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.

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.

feature: use environment variables instead of --token
1 participant