automation/ansible
2020-05-01 15:40:16 +02:00
..
group_vars/all new wordpress creation pipeline! 2020-05-01 15:40:16 +02:00
roles new wordpress creation pipeline! 2020-05-01 15:40:16 +02:00
ansible.cfg started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
build.yml started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
command we build config files remotely. next test the mailing through msmtp and deploy! 2020-03-31 18:32:13 +02:00
deploy.yml started a config for jitsi and modified some ansible to include arvuhez 2020-04-20 15:44:45 +02:00
inventory started jitsi conf and moved zinzoscope and lexperimental to templating solution 2020-04-27 09:45:07 +02:00
README.md new wordpress creation pipeline! 2020-05-01 15:40:16 +02:00
sites.yml deployed rennesdesbois.fr 2020-04-09 17:29:12 +02:00

Deployer: deploy your shit and make it run

So lame to have to configure nginx, MySQL, and your filesystem to install a stupid Wordpress instance.

Deployer does my config for me like the slave it is.

All the configuration is defined in group_vars/all/vars.yml, go check.

Create a side group_vars/all/vault.yml for your secrets, and encrypt it with Ansible Vault:

ansible-vault encrypt group_vars/all/vault.yml
# other sub-commands: edit, decrypt...

I usually run the following command:

ansible-playbook --ask-vault-pass sites.yml -i inventory -v

Required packages on remote

Python modules:

  • docker
  • docker-compose
  • pymysql

TODO: Ansible task to install that before the rest

Features

  • Creating Wordpress instances (yoohoo, da best)

    • That send mail!!11!1!

Does not support

  • Setting up the host

  • SSL certificate creation (bro, do it yourself!). That is:

    # Make an nginx file for certbot 
    cat << EOF > /etc/nginx/sites-enabled/yoursite.com
    server {
    	listen 80;
    	server_name www.yoursite.com yoursite.com;
    	include snippets/letsencrypt.conf;
    }
    EOF
    nginx -t # Is everything alright?
    # If so, restart nginx
    service nginx restart 
    # Create the certificate
    certbot certonly --webroot -w /var/www/letsencrypt -d yoursite.com -d www.yoursite.com
    # Remove the stupid file
    rm /etc/nginx/sites-enabled/yoursite.com
    service nginx restart