Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
# 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
@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] *******************
@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: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: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: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] *******************
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] *******************
TASK [deploy : Clone project files] ********************************************
System info:
Ansible 2.2.1.0; Darwin
Trellis at "Remove potentially dangerous `db_import` option"
---------------------------------------------------
Cloning into '/srv/www/kangapestcontrol.com/shared/source'...
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING:********@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
TASK [deploy : Run gulp] *******************************************************
System info:
Ansible 2.2.1.0; Darwin
Trellis at "Remove potentially dangerous `db_import` option"
---------------------------------------------------
fatal: [staging.kangapestcontrol.com]: FAILED! => {"changed": true, "cmd": ["gulp", "--production"], "delta": "0:00:10.633263", "end": "2017-04-10 13:27:15.969226", "failed": true, "rc": 1, "start": "2017-04-10 13:27:05.335963", "stderr": "", "stdout": "[13:27:08] Using gulpfile ~/Sites/kangapestcontrol.com/site/web/app/themes/kanga-pest-control-2017/gulpfile.js\n[13:27:08] Starting 'clean'...\n[13:27:08] Finished 'clean' after 39 ms\n[13:27:08] Starting 'default'...\n[13:27:08] Starting 'build'...\n[13:27:08] Starting 'wiredep'...\n[13:27:09] Finished 'default' after 429 ms\n[13:27:09] Finished 'wiredep' after 486 ms\n[13:27:09] Starting 'styles'...\n[13:27:15] Finished 'styles' after 6.41 s\n[13:27:15] Starting 'jshint'...\n\nassets/scripts/main.js\n line 25 col 11 Missing
<div class="row" id="kpc-row-10">
<div class="container">
<div class="row">
<div class="col-sm">
</div>
<div class="col-sm">