we would like to announce a stable version of Ansible Discourse, it is an ansible playbook that helps you to confgure and provision the Discourse Docker easily.
I hope that this project can be useful for everyone who wants to install and configure a new Discourse.
Do you have any feedback?
Contributors are welcome
At the moment we wrote two scripts (scripts/) that can be used to run the provisioning on a local vagrant machine or AWS. It could be useful to add support for other providers, like DigitalOcean, Google Cloud, and other.
I’ve been using Ansible a lot thanks to the fantastic RootsTrellis for WordPress, and I’ve come to realise the benefits of using automated provisions and deploys with the ability to store the configs in git.
I look after several discourse instances and this approach will allow me to properly standardise everything.
I’m going to have a play with this and report back.
This is great! But why is it exclusive to AWS? What if I would like to use Discourse Docker and Ansible to provision this on another VPS such as Linode, Vultr or DigitalOcean?
Any chance to make this a little more flexible? Is there a hard requirement on AWS? I see that AWS-CLI is listed as a requirement
Hi @vesper8, take a look at the Provisioning section. As you will see there, you can easily run the provision against a local host (like vagrant), and of course, it will be very easy to adapt the script to make it works against other environments, like DigitalOcean or other.
Have you been able to skip the registration/after installation wizard. I am trying to make an ansible role to install discourse and skip any GUI configuration such as register or import custom theme. it been days looking for a way
exec: cd /var/www/discourse && rails r "SiteSetting.notification_email= 'discourse@test.kfupm.edu.sa'"
worked!!!
the issue was when I bootstrap the container it return an exception because of ‘:’ used in the command,
to solve this I put the command in a file.rb and in the custom command section I added
exec: cd /var/www/discourse && rails r file.rb
of course you need to copy the file.rb into the container.
Hi @ahmed_alamiry I have added the same command in app.yml custom command section but I am getting the below error. If you don’t mind could you please guide me.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && rails r file.rb failed with return #<Process::Status: pid 5317 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "cd /var/www/discourse && rails r file.rb"
Note : I have tried with placed the file under "/var/discourse/container# " then place inside the container “/var/www/discourse/” but both the time I got the same error.
Please guide me to configure this, Many thanks in advance.
@Muthukkumar what inside file.rb ?
Place the file.rb in /var/discourse/shared/standalone (or what ever path in the volume section).
In app.yml under run add:
This redirects to a Cloudformation Discord now, with no mention of Ansible or a playbook. Is your Ansible Discord playbook discontinued now? Can you tell more about why if this is the case?
Do be aware this is an unsupported-install configuration so if anyone does proceed to use discourse-docker with Ansible, it will not be supported here.