Provisioning the server works fine.
My issue starts when doing the first ever deploy.
My brand new github repo is empty except for readme files.
I would really like to know what is the requirements, should the github repo contain bedrock already?
When running
ansible-playbook deploy.yml -e "site=staging.reshape.nu env=staging" -i hosts/staging
I get this
PLAY [Ensure necessary variables are defined] **********************************************************************************************************************
TASK [Ensure environment is defined] *******************************************************************************************************************************
skipping: [localhost]
PLAY [Test Connection] *********************************************************************************************************************************************
TASK [connection : Require manual definition of remote-user] *******************************************************************************************************
skipping: [35.228.230.145]
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ******************************************************************************************
skipping: [35.228.230.145]
TASK [connection : Check whether Ansible can connect as web] *******************************************************************************************************
ok: [35.228.230.145 -> localhost]
TASK [connection : Warn about change in host keys] *****************************************************************************************************************
skipping: [35.228.230.145]
TASK [connection : Set remote user for each host] ******************************************************************************************************************
skipping: [35.228.230.145]
TASK [connection : Announce which user was selected] ***************************************************************************************************************
skipping: [35.228.230.145]
TASK [connection : Load become password] ***************************************************************************************************************************
skipping: [35.228.230.145]
PLAY [Deploy WP site] **********************************************************************************************************************************************
TASK [Gathering Facts] *********************************************************************************************************************************************
ok: [35.228.230.145]
TASK [Ensure site is valid] ****************************************************************************************************************************************
skipping: [35.228.230.145]
TASK [Ensure repo is valid] ****************************************************************************************************************************************
skipping: [35.228.230.145]
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : Initialize] *****************************************************************************************************************************************
ok: [35.228.230.145]
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : Add known_hosts] ************************************************************************************************************************************
ok: [35.228.230.145] => (item=github.com ssh-rsa NOT SHOWING MY ID_RSA FOR.... REASONS =) )
TASK [deploy : Clone project files] ********************************************************************************************************************************
ok: [35.228.230.145]
TASK [deploy : Remove untracked files from project folder] *********************************************************************************************************
ok: [35.228.230.145]
TASK [deploy : Failed connection to remote repo] *******************************************************************************************************************
skipping: [35.228.230.145]
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : Check for project repo subtree] *********************************************************************************************************************
skipping: [35.228.230.145]
TASK [deploy : Fail if repo_subtree_path is set incorrectly] *******************************************************************************************************
skipping: [35.228.230.145]
TASK [deploy : Create new release dir] *****************************************************************************************************************************
changed: [35.228.230.145]
TASK [deploy : Run git archive to populate new build dir] **********************************************************************************************************
changed: [35.228.230.145]
TASK [deploy : Run git archive with subdirectory to populate new build dir] ****************************************************************************************
skipping: [35.228.230.145]
TASK [deploy : write unfinished file] ******************************************************************************************************************************
changed: [35.228.230.145]
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : include_tasks] **************************************************************************************************************************************
TASK [deploy : Copy project templates] *****************************************************************************************************************************
changed: [35.228.230.145] => (item={u'dest': u'.env', u'src': u'roles/deploy/templates/env.j2', u'name': u'.env config'})
TASK [deploy : Check if project folders exist] *********************************************************************************************************************
ok: [35.228.230.145] => (item=vendor)
TASK [deploy : Copy project folders] *******************************************************************************************************************************
skipping: [35.228.230.145] => (item={'failed': False, u'stat': {u'exists': False}, 'ansible_loop_var': u'item', 'item': u'vendor', u'invocation': {u'module_args': {u'follow': False, u'get_checksum': True, u'path': u'/srv/www/staging.reshape.nu/current/vendor', u'checksum_algorithm': u'sha1', u'get_md5': None, u'get_mime': True, u'get_attributes': True}}, u'changed': False})
TASK [deploy : include_tasks] **************************************************************************************************************************************
included: /Users/danadalis/Roots/reshape.nu/trellis/roles/deploy/hooks/build-after.yml for 35.228.230.145
TASK [deploy : Check for composer.json in project root or project_subtree_path] ************************************************************************************
ok: [35.228.230.145]
TASK [deploy : Fail if composer.json not found] ********************************************************************************************************************
System info:
Ansible 2.8.4; Darwin
Trellis Head
---------------------------------------------------
Unable to find a `composer.json` file in the root of
'/srv/www/staging.reshape.nu/releases/20200212191739'. Make sure your repo
has a `composer.json` file in its root or edit `repo_subtree_path` for
'staging.reshape.nu' in `wordpress_sites.yml` so it points to the directory
with a `composer.json` file.
fatal: [35.228.230.145]: FAILED! => {"changed": false}
PLAY RECAP *********************************************************************************************************************************************************
35.228.230.145 : ok=13 changed=4 unreachable=0 failed=1 skipped=20 rescued=0 ignored=0
localhost : ok=0 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
danadalis@Daniels-MacBook-Pro-2 trellis %