Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
@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=="}
---------------------------------------------------
@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') }}"
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: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 ***********************************************************
@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`.
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: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
@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
@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
# 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