use environment variable to pass in registration token #241
+8
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.