Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
trellis git:(master) ✗ ./bin/deploy.sh staging staging.kangapestcontrol.com
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection] *********************************************************
TASK [connection : Require manual definition of remote-user] *******************
@s3w47m88
s3w47m88 / gist:c3cf6f1fa45f598af29fdc08b2d46191
Created April 10, 2017 03:26
./bin/deploy.sh staging kangapestcontrol.com
trellis git:(master) ✗ ./bin/deploy.sh staging kangapestcontrol.com
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection] *********************************************************
TASK [connection : Require manual definition of remote-user] *******************
@s3w47m88
s3w47m88 / gist:0c342c9c44407327a33d96cbc10906d7
Last active April 9, 2017 18:19
Fourth Error: permission denied to /srv/www/kangapestcontrol.com
TASK [deploy : Initialize] *****************************************************
task path: /Users/s3w47m88/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/initialize.yml:8
Using module file /Library/Python/2.7/site-packages/ansible/modules/extras/web_infrastructure/deploy_helper.py
<staging.kangapestcontrol.com> ESTABLISH SSH CONNECTION FOR USER: web
<staging.kangapestcontrol.com> SSH: EXEC ssh -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 -o ControlPath=/Users/s3w47m88/.ansible/cp/ansible-ssh-%h-%p-%r staging.kangapestcontrol.com '/bin/sh -c '"'"'/usr/bin/python && sleep 0'"'"''
System info:
Ansible 2.2.2.0; Darwin
Trellis 1.0.0-rc.1: April 7th, 2017
---------------------------------------------------
MODULE FAILURE
@s3w47m88
s3w47m88 / gist:8784b1fe1e569b11ce461ae8f08b8736
Created April 9, 2017 18:13
Third Error: Site not valid.
➜ trellis git:(master) ✗ ./bin/deploy.sh staging staging.kangapestcontrol.com
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection] *********************************************************
TASK [connection : Require manual definition of remote-user] *******************
@s3w47m88
s3w47m88 / gist:fda874cba45e42fde2801fd03e34916c
Last active April 9, 2017 18:12
Second Error: Occurs when issuing SSLs repeatedly.
TASK [letsencrypt : Generate the certificates] *********************************
System info:
Ansible 2.2.2.0; Darwin
Trellis 1.0.0-rc.1: April 7th, 2017
---------------------------------------------------
fatal: [staging.kangapestcontrol.com]: FAILED! => {"changed": false, "cmd": ["./renew-certs.py"], "delta": "0:00:04.379857", "end": "2017-04-09 18:10:07.032556", "failed": true, "rc": 1, "start": "2017-04-09 18:10:02.652699", "stderr": "", "stdout": "Generating certificate for kangapestcontrol.com\nError while generating certificate for kangapestcontrol.com\nTraceback (most recent call last):\n File \"/usr/local/letsencrypt/acme_tiny.py\", line 198, in <module>\n main(sys.argv[1:])\n File \"/usr/local/letsencrypt/acme_tiny.py\", line 194, in main\n signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca)\n File \"/usr/local/letsencrypt/acme_tiny.py\", line 161, in get_crt\n raise ValueError(\"Error signing certificate: {0} {1}\".format(code, result))\nValueErro
@s3w47m88
s3w47m88 / gist:c36aa6a730154c1cc089e9934d50b394
Created April 9, 2017 18:04
First Error - ansible-playbook server.yml -e env=staging
➜ trellis git:(master) ✗ ansible-playbook server.yml -e env=staging
PLAY [Ensure necessary variables are defined] **********************************
TASK [Ensure environment is defined] *******************************************
skipping: [localhost]
PLAY [Test Connection and Determine Remote User] *******************************
TASK [connection : Require manual definition of remote-user] *******************
# Add each host to the [production] group and to a "type" group such as [web] or [db].
# List each machine only once per [group], even if it will host multiple sites.
[production]
kangapestcontrol.com
[web]
kangapestcontrol.com
# Add each host to the [staging] group and to a "type" group such as [web] or [db].
# List each machine only once per [group], even if it will host multiple sites.
[staging]
staging.kangapestcontrol.com
[web]
staging.kangapestcontrol.com
@s3w47m88
s3w47m88 / gist:2a2a9d7725f567c86a875cca72981b54
Created April 9, 2017 17:26
production/wordpress_sites.yml
# Documentation: https://roots.io/trellis/docs/remote-server-setup/
# `wordpress_sites` options: https://roots.io/trellis/docs/wordpress-sites
# Define accompanying passwords/secrets in group_vars/production/vault.yml
wordpress_sites:
kangapestcontrol.com:
site_hosts:
- canonical: kangapestcontrol.com
redirects:
- www.kangapestcontrol.com
@s3w47m88
s3w47m88 / gist:9bf9e11c921e3169a17cb3f2d4d24a2b
Created April 9, 2017 17:25
staging/wordpress_sites.yml
# Documentation: https://roots.io/trellis/docs/remote-server-setup/
# `wordpress_sites` options: https://roots.io/trellis/docs/wordpress-sites
# Define accompanying passwords/secrets in group_vars/staging/vault.yml
wordpress_sites:
staging.kangapestcontrol.com:
site_hosts:
- canonical: staging.kangapestcontrol.com
# redirects:
# - otherdomain.com