Skip to content

When using default.yml to add configuration, empty keys aren't added to config files #375

@mhoogcarspel-splunk

Description

@mhoogcarspel-splunk

When using default.yml to add configuration, empty keys aren't added to config files

This can be interesting for example for adding empty serverclasses.

Example:

splunk:
	conf:
		serverclass:
			directory: /opt/splunk/etc/system/local
			content:
				global:
					targetRepositoryLocation: $SPLUNK_HOME/etc/apps
					disabled: false
					excludeFromUpdate: "$app_root$/.git*"
					"serverClass:secrets": 
						repositoryLocation: /etc/splunk/secrets
					"serverClass:secrets:app:test": {}
					"serverClass:secrets:app:*": []
					"serverClass:secrets:app:universal_secrets":
						"whitelist.0": "*splunk-ingester*"

results in

[serverClass:secrets:app:test]
[serverClass:secrets:app:*]

missing in /opt/splunk/etc/system/local/serverclass.conf after.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions