Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
@s3w47m88
s3w47m88 / gist:b7af37c76209387a218e863d3f520548
Created April 9, 2017 17:24
development/wordpress_sites.yml
# Documentation: https://roots.io/trellis/docs/local-development-setup/
# `wordpress_sites` options: https://roots.io/trellis/docs/wordpress-sites
# Define accompanying passwords/secrets in group_vars/development/vault.yml
wordpress_sites:
kkangapestcontrol.dev:
site_hosts:
- canonical: kangapestcontrol.dev
redirects:
- www.kangapestcontrol.dev
TASK [Install Python 2.x] ******************************************************
System info:
Ansible 2.2.1.0; Darwin
Trellis at "Check Ansible version before Ansible validates task attributes"
---------------------------------------------------
Failed to connect to the host via ssh: Permission denied (publickey).
fatal: [staging.kangapestcontrol.com]: UNREACHABLE! => {"changed": false, "unreachable": true}
to retry, use: --limit @/Users/spencerhill/Sites/kangapestcontrol.com/trellis/server.retry
@s3w47m88
s3w47m88 / gist:317ad0f27f2a682887e307fc72e8698b
Created April 6, 2017 19:02
Error: This does not seem to be a WordPress install.
TASK [deploy : Create file with multisite constants defined as false] **********
changed: [staging.OMITTED.com]
TASK [deploy : WordPress Installed?] *******************************************
System info:
Ansible 2.2.1.0; Darwin
Trellis at "Check Ansible version before Ansible validates task attributes"
---------------------------------------------------
Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.
@s3w47m88
s3w47m88 / gist:2acf95fbb7ab1ea2eae3386a5005f7de
Created April 5, 2017 00:48
ansible-playbook deploy.yml -e env=staging -e site=staging.OMITTED.com -vvvv
➜ trellis git:(master) ✗ ansible-playbook deploy.yml -e env=staging -e site=staging.kangapestcontrol.com -vvv
Using /Users/spencerhill/Sites/kangapestcontrol.com/trellis/ansible.cfg as config file
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/initialize.yml
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/update.yml
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/prepare.yml
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/build.yml
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/share.yml
statically included: /Users/spencerhill/Sites/kangapestcontrol.com/trellis/roles/deploy/tasks/finalize.yml
PLAYBOOK: deploy.yml ***********************************************************
web@kangapestcontrol:~$ ls -alh /home/web/.ssh
total 20K
drwx------ 2 web www-data 4.0K Apr 4 23:11 .
drwxr-xr-x 4 web www-data 4.0K Apr 4 22:38 ..
-rw------- 1 web www-data 426 Apr 4 19:08 authorized_keys
-rw------- 1 root root 1.3K Apr 4 23:11 known_hosts
-rw-r--r-- 1 web www-data 1.7K Apr 4 22:38 known_hosts.old
@s3w47m88
s3w47m88 / gist:88f9a18c146192b6a63e1f9459b9efde
Created April 4, 2017 23:28
trellis/group_vars/all/users.yml
# Documentation: https://roots.io/trellis/docs/ssh-keys/
admin_user: admin
# Also define 'vault_users' (`group_vars/staging/vault.yml`, `group_vars/production/vault.yml`)
users:
- name: "{{ web_user }}"
groups:
- "{{ web_group }}"
keys:
- "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
@s3w47m88
s3w47m88 / gist:c3a912fd50ec2dd3f8eb60a80142864b
Created April 4, 2017 23:25
Trellis SSH Key Forwarding Error
TASK [deploy : Add known_hosts] ************************************************
System info:
Ansible 2.2.1.0; Darwin
Trellis at "Check Ansible version before Ansible validates task attributes"
---------------------------------------------------
ssh-keygen failed (rc=255,stdout='',stderr='do_known_hosts: hostkeys_foreach
failed: Permission denied
')
failed: [staging.OMITTED.com] (item=github.com ssh-rsa OMITTED==) => {"failed": true, "item": "github.com ssh-rsa OMITTED=="}
---------------------------------------------------
# Documentation: https://roots.io/trellis/docs/vault/
vault_mysql_root_password: {omitted}
# Documentation: https://roots.io/trellis/docs/security/
vault_users:
- name: "{{ admin_user }}"
password: {omitted}
# Variables to accompany `group_vars/staging/wordpress_sites.yml`
# Note: the site name (`example.com`) must match up with the site name in the above file.
@s3w47m88
s3w47m88 / gist:0bdb33390cb7d2c6e162fbbf46aa48ae
Created March 27, 2017 18:52
(Don't Delete) Font-Awesome Inclusion to Sage & Bootstrap 4
,
"overrides": {
"font-awesome": {
"main": [
"./scss/font-awesome.scss",
"./fonts/*"
]
}
}
/* ========================================================================
* DOM-based Routing
* Based on http://goo.gl/EUTi53 by Paul Irish
*
* Only fires on body classes that match. If a body class contains a dash,
* replace the dash with an underscore when adding it to the object below.
*
* .noConflict()
* The routing is enclosed within an anonymous function so that you can
* always reference jQuery with $, even when in .noConflict() mode.