Roots Trellis further explorations

Trellis, from the Roots team, is basically a DevOps platform for wordpress.

So I just want to note a few of the items I came across, as usual, mostly for my own reference.

We add plugins using Composer, grabbing them, if available from Packagist:

“require”: {
“php”: “>=5.5”,
“composer/installers”: “~1.0.12”,
“vlucas/phpdotenv”: “^2.0.1”,
“johnpbloch/wordpress”: “4.5”,
“oscarotero/env”: “^1.0”,
“roots/wp-password-bcrypt”: “1.0.0”,
“wpackagist-plugin/wordpress-importer”: “0.6.2”,
“wpackagist-plugin/comet-cache”: “160417”,
“wpackagist-plugin/simple-wp-maintenance-mode”: “1.0”
}

Then I run composer update.

We use sSMTP for mail, and I’m running it through my gmail app. The group_vars/all/mail.yml file looks like:

# Documentation: https://roots.io/trellis/docs/mail/
mail_smtp_server: smtp.domain.com:587
mail_admin: admin@domain.com
mail_hostname: domain.com
mail_user: smtp_user
mail_password: "{{ vault_mail_password }}" # Define this variable in group_vars/all/vault.yml

But my group_vars/all/vault.yml looks like:

 vault_mail_password: arbitrary_password (?)
 mail_smtp_server: smtp.gmail.com:587 
 mail_hostname: smtp.gmail.com
 mail_user: me@gmail.address
 mail_password: gmailpassword

And provisioning generates the following /etc/ssmtp/ssmtp.conf;

root=admin@domain.com
AuthMethod=LOGIN
FromLineOverride=Yes
UseTLS=Yes
UseSTARTTLS=Yes
hostname=smtp.gmail.com
mailhub=smtp.gmail.com:587
AuthUser=me@gmail.com
AuthPass=gmailpassword

I dunno. To provision I run ansible-playbook server.yml -e env=production --vault-password .vault_pass and to deploy:

ansible-playbook deploy.yml -e "site=domain.com env=production" --vault-password .vault_pass

Or to avoid having to include the --vault-pass flag, add the following to the ansible.cfg file:

vault_password_file = .vault_pass