now the question: can I do this before starting splunk first time? The aim is fully automatize the installation, so no manual intervention would be required. What I also have in mind is keeping this setting in server.conf which I feed to splunk after the (rpm) installation and before starting it, but I feel that using CLI is more proper way to do this.
Howdy. The CLI requires Splunk to be on. Your thought on server.conf is the better way to automate. Since you've seen the cli, just grab the server.conf line that was created and have your script write that out. That way, when you start Splunk, the license master is already set.