moodle-saltstack is a set of SaltStack states designed for the automated installation and configuration of Moodle, an open-source learning management system. This project ensures a smooth and consistent deployment of Moodle with Nginx and PostgreSQL on Ubuntu 24.04 servers using Salt SSH .
To install and set up Moodle using this SaltStack routine, follow these steps:
- Install SaltStack: Follow the official SaltStack installation guide to install SaltStack on your local machine.
- Configure Salt SSH:
Ensure Salt SSH is properly configured. You will need to configure the
roster
file to define the target servers. Exampleroster
file:
myserver:
host: 192.168.0.1
user: myuser
passwd: mypassword
- Clone the Repository:
cd /srv/salt git clone https://github.com/gaydaci/moodle-saltstack.git cd moodle-saltstack
- Deploy on targets:
salt-ssh '*' state.apply
- nginx: Installs the Nginx web server.
- php8: Installs PHP version 8 and handles its configuration.
- postgresql: Installs and sets up the PostgreSQL database server. Creates user and database for Moodle.
- moodle: Manages the installation and configuration of the Moodle learning management system.
- cfg_nginx: Configures the Nginx server, with the simple configuration in nginx/moodle.conf.
- letsencrypt: Handles the generation and automatic installation of Let's Encrypt SSL certificates for Nginx using certbot.