splunk / splunk-ansible

Ansible playbooks for configuring and managing Splunk Enterprise and Universal Forwarder deployments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Splunk role not respected when set in default.yml

dp-42 opened this issue · comments

Hello,

according to the default.yml.spec.md you can define the role of the resulting instance using the splunk.role variable.
However, this variable is not respected by the merge logic.

defaultVars["splunk"]["role"] = os.environ.get('SPLUNK_ROLE', 'splunk_standalone')

As far as understand the merge logic reads the environment variable SPLUNK_ROLE and sets splunk_standalone as a fallback,
Therefore, regardless what I define in my default.yml I always have to set the environment variable as well.

I assume this is not intended behavior?

Ah, this is likely because the docker images set SPLUNK_ROLE=splunk_standalone, so the default.yml won't pick it up. Let me see if there's an alternative here.

Done in linked PR