Skipping the configuration wizard after installation

AI-generated summary

The discussion revolves around automating the configuration of a Discourse installation using Ansible, bypassing the web-based setup wizard. squidboylan seeks a way to configure site settings like name, color, and icon via Ansible instead of the web interface. DeanMarkTaylor suggests setting the wizard_enabled site setting to false to skip the wizard, and notes that settings can be adjusted via the API. pfaffman acknowledges the challenge of obtaining an API key without the web interface, proposing a workaround by running console commands inside the container. smaffulli asks about post-deployment customization, to which pfaffman replies that plugin installation can be handled by editing the app.yml file and rebuilding. DeanMarkTaylor references custom commands in the Discourse Docker sample configuration as a potential solution. ahmed_alamiry inquires if a solution was found.

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?

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.

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.

@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.

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.

Yeah a lot can be done here with custom commands:

Did you find a solution to this?