Skipping the configuration wizard after installation


(Caleb Boylan) #1

I’m writing an Ansible playbook to deploy discourse automatically. The problem is that I would like to automate the configuration that is done in the web browser after the installation. This would make it so that things like forum name, color, icon, etc would be configurable through the Ansible playbook instead of through the web installer. I can’t find any documentation on how to do this, is it possible?


(Dean Taylor) #2

I’m pretty sure you could set the hidden site setting wizard_enabled to false and this will prevent the wizard from displaying …

… obviously you can set this and other settings via API calls as one option.


(Jay Pfaffman) #3

I’ve been thinking about that a little, and have started a couple times to use Ansible rather than my set of shell scripts, but I’ve not quite gotten over the hump.

You could do stuff like that with the API, but you can’t use the API until you get an API key. To get an API key, you need to either use the web interface or (and I haven’t tested this) enter the container and issue a console command to generate and return the API key.


(Stefano Maffulli) #4

@pfaffman do your scripts do any customization after the initial deployment? One of the things we’re trying to do with this ansible script is to customize the UI and install custom plugins, without having to click-click on anything.


(Jay Pfaffman) #5

Plugins, I’ve got scripted. Not hard to edit the app.yml file and rebuild.

Aha! It might be possible to create a template that would give console commands to set and get an API key, and then Bob’s your uncle.


(Dean Taylor) #6

Yeah a lot can be done here with custom commands: