-
Notifications
You must be signed in to change notification settings - Fork 274
modify create defaults for pass4symmkey change #308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| splunk_hec_token = os.environ.get("SPLUNK_HEC_TOKEN", None) | ||
| splunk_password = os.environ.get("SPLUNK_PASSWORD", None) | ||
| splunk_idxc_secret = os.environ.get("SPLUNK_IDXC_SECRET", None) | ||
| splunk_idxc_pass4SymmKey = os.environ.get("SPLUNK_SHC_PASS4SYMMKEY", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be SPLUNK_IDXC_PASS4SYMMKEY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if not splunk_idxc_secret: | ||
| os.environ["SPLUNK_IDXC_SECRET"] = random_generator() | ||
| if not splunk_idxc_pass4SymmKey: | ||
| os.environ["SPLUNK_IDXC_SECRET"] = os.environ["SPLUNK_IDXC_SECRET"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this more, maybe this section should first check splunk_idxc_pass4SymmKey, that way when do deprecate the old variable in the splunk-ansible code, we don't need to modify this script again. Something like
if splunk_idxc_pass4SymmKey:
os.environ["SPLUNK_IDXC_PASS4SYMMKEY"] = os.environ["SPLUNK_IDXC_SECRET"] = splunk_idxc_pass4SymmKey
elif splunk_idxc_secret:
os.environ["SPLUNK_IDXC_PASS4SYMMKEY"] = os.environ["SPLUNK_IDXC_SECRET"] = splunk_idxc_secret
else:
# generate random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense
Makes indexer and search head pass4SymmKey values match the randomly generated indexer and search head secrets in the event that neither are present. Resolves a test failure in develop as a result of a change to splunk-ansible.