Mind running the deploy command one more time with -vvvv
and pasting the full output?
ansible-playbook -i hosts/staging deploy.yml --extra-vars "site=bedrock.com" -vvvv
I followed the walkthrough on this site to manually add my ssh key using:
ssh-copy-id web@45.55.241.241
(I had to first reset my password for the web user on the server as I had no idea what this was set to)
That got me passed the SSH Key issue but now I have a new issue
failed: [45.55.241.241] => (item={āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}) => {āfailedā: true, āitemā: {āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}, āpathā: ā/srv/www/bedrock.com/releases/20150423201953/web/app/uploadsā, āstateā: āabsentā}
msg: Error while linking: [Errno 2] No such file or directory
FATAL: all hosts have already failed ā aborting
@fullyint - Hereās the full output:
ansible-playbook -i hosts/staging deploy.yml --extra-vars āsite=bedrock.comā -vvvv
PLAY [Deploy WP site] *********************************************************
GATHERING FACTS ***************************************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE setup
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492 && echo $HOME/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpyp4J_m TO /home/web/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492/setup
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492/setup; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835239.46-169090882513492/ >/dev/null 2>&1ā
ok: [45.55.241.241]
TASK: [deploy | Initialize] ***************************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE deploy_helper path=ā/srv/www/bedrock.comā state=present
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692 && echo $HOME/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpOn7LyJ TO /home/web/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692/deploy_helper
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692/deploy_helper; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835244.12-66544580754692/ >/dev/null 2>&1ā
ok: [45.55.241.241] => {āansible_factsā: {ādeploy_helperā: {ācurrent_pathā: ā/srv/www/bedrock.com/currentā, ānew_releaseā: ā20150423202404ā, ānew_release_pathā: ā/srv/www/bedrock.com/releases/20150423202404ā, āprevious_releaseā: null, āprevious_release_pathā: null, āproject_pathā: ā/srv/www/bedrock.comā, āreleases_pathā: ā/srv/www/bedrock.com/releasesā, āshared_pathā: ā/srv/www/bedrock.com/sharedā, āunfinished_filenameā: āDEPLOY_UNFINISHEDā}}, āchangedā: false, āstateā: āpresentā}
TASK: [deploy | Clone project files] ******************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE git repo= dest=ā/srv/www/bedrock.com/shared/sourceā version=āmasterā accept_hostkey=yes
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435 && echo $HOME/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpMTIAwe TO /home/web/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435/git
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435/git; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835245.16-120691099126435/ >/dev/null 2>&1ā
ok: [45.55.241.241] => {āafterā: ā248546384754f1ae13f72f1a1ec243eaf81d0a87ā, ābeforeā: ā248546384754f1ae13f72f1a1ec243eaf81d0a87ā, āchangedā: false}
TASK: [deploy | write unfinished file] ****************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE file path=ā/srv/www/bedrock.com/shared/source/DEPLOY_UNFINISHEDā state=touch
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567 && echo $HOME/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpx9VJ3h TO /home/web/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567/file
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567/file; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835251.95-128102627804567/ >/dev/null 2>&1ā
changed: [45.55.241.241] => {āchangedā: true, ādestā: ā/srv/www/bedrock.com/shared/source/DEPLOY_UNFINISHEDā, āgidā: 33, āgroupā: āwww-dataā, āmodeā: ā0644ā, āownerā: āwebā, āsizeā: 0, āstateā: āfileā, āuidā: 1000}
TASK: [deploy | Copy files to new build dir] **********************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE command cp -pr /srv/www/bedrock.com/shared/source /srv/www/bedrock.com/releases/20150423202404
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935 && echo $HOME/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpkBRrW2 TO /home/web/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935/command
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935/command; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835253.01-187975690550935/ >/dev/null 2>&1ā
changed: [45.55.241.241] => {āchangedā: true, ācmdā: [ācpā, ā-prā, ā/srv/www/bedrock.com/shared/sourceā, ā/srv/www/bedrock.com/releases/20150423202404ā], ādeltaā: ā0:00:00.020942ā, āendā: ā2015-04-23 20:24:13.824129ā, ārcā: 0, āstartā: ā2015-04-23 20:24:13.803187ā, āstderrā: āā, āstdoutā: āā, āwarningsā: }
TASK: [deploy | Move project subtree into root folder] ************************
skipping: [45.55.241.241]
TASK: [deploy | Remove unwanted files/folders from new release] ***************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE file path=ā/srv/www/bedrock.com/releases/20150423202404/.gitā state=absent
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035 && echo $HOME/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpaLXVw0 TO /home/web/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035/file
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035/file; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835254.09-133873997428035/ >/dev/null 2>&1ā
changed: [45.55.241.241] => (item=.git) => {āchangedā: true, āitemā: ā.gitā, āpathā: ā/srv/www/bedrock.com/releases/20150423202404/.gitā, āstateā: āabsentā}
TASK: [deploy | Run pre_build_commands_local on Ansible host] *****************
skipping: [45.55.241.241]
TASK: [deploy | Copy project local files] *************************************
skipping: [45.55.241.241]
TASK: [deploy | Copy project templates] ***************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835255.09-529137414642 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835255.09-529137414642 && echo $HOME/.ansible/tmp/ansible-tmp-1429835255.09-529137414642ā
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c ārc=flag; [ -r /srv/www/bedrock.com/releases/20150423202404/.env ] || rc=2; [ -f /srv/www/bedrock.com/releases/20150423202404/.env ] || rc=1; [ -d /srv/www/bedrock.com/releases/20150423202404/.env ] && rc=3; python -V 2>/dev/null || rc=4; [ x"$rc" != āxflagā ] && echo "${rc} ā/srv/www/bedrock.com/releases/20150423202404/.env && exit 0; (python -c 'āāā'import hashlib; BLOCKSIZE = 65536; hasher = hashlib.sha1(); afile = open(āā"āāā/srv/www/bedrock.com/releases/20150423202404/.envāāā"āā, ārbā) buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) buf = afile.read(BLOCKSIZE) afile.close() print(hasher.hexdigest())'āā"ā 2>/dev/null) || (python -c ā"āā'import sha; BLOCKSIZE = 65536; hasher = sha.sha(); afile = open(āā"āāā/srv/www/bedrock.com/releases/20150423202404/.envāāā"āā, ārbā) buf = afile.read(BLOCKSIZE) while len(buf) > 0: hasher.update(buf) buf = afile.read(BLOCKSIZE) afile.close() print(hasher.hexdigest())'āā"ā 2>/dev/null) || (echo ā"āā'0 'āā"ā/srv/www/bedrock.com/releases/20150423202404/.env)ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpUMJrOe TO /home/web/.ansible/tmp/ansible-tmp-1429835255.09-529137414642/source
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpbLrlUm TO /home/web/.ansible/tmp/ansible-tmp-1429835255.09-529137414642/copy
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835255.09-529137414642/copy; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835255.09-529137414642/ >/dev/null 2>&1ā
changed: [45.55.241.241] => (item={ādestā: ā.envā, āsrcā: āroles/deploy/templates/env.j2ā, ānameā: ā.env configā}) => {āchangedā: true, āchecksumā: ā4ec357d01f1c372b44fb51d9071708ff628c2cf9ā, ādestā: ā/srv/www/bedrock.com/releases/20150423202404/.envā, āgidā: 33, āgroupā: āwww-dataā, āitemā: {ādestā: ā.envā, ānameā: ā.env configā, āsrcā: āroles/deploy/templates/env.j2ā}, āmd5sumā: ā1f3c5af870c3fdb143511dbe15cd4e45ā, āmodeā: ā0644ā, āownerā: āwebā, āsizeā: 347, āsrcā: ā/home/web/.ansible/tmp/ansible-tmp-1429835255.09-529137414642/sourceā, āstateā: āfileā, āuidā: 1000}
TASK: [deploy | Run pre_build_commands in the new_release_path] ***************
skipping: [45.55.241.241]
TASK: [deploy | Check if project folders exist] *******************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE stat path=ā/srv/www/bedrock.com/current/vendorā
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672 && echo $HOME/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpOOiDvK TO /home/web/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672/stat
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672/stat; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835256.76-125569270747672/ >/dev/null 2>&1ā
ok: [45.55.241.241] => (item=vendor) => {āchangedā: false, āitemā: āvendorā, āstatā: {āexistsā: false}}
TASK: [deploy | Copy project folders] *****************************************
skipping: [45.55.241.241] => (item={āinvocationā: {āmodule_nameā: uāstatā, āmodule_argsā: uāpath=ā/srv/www/bedrock.com/current/vendorāā}, āitemā: āvendorā, uāstatā: {uāexistsā: False}, uāchangedā: False})
TASK: [deploy | Ensure shared sources are present] ****************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE file path=ā/srv/www/bedrock.com/shared/uploadsā state=ādirectoryā
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253 && echo $HOME/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpWpeu6y TO /home/web/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253/file
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253/file; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835257.72-183071889507253/ >/dev/null 2>&1ā
ok: [45.55.241.241] => (item={āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}) => {āchangedā: false, āgidā: 33, āgroupā: āwww-dataā, āitemā: {āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}, āmodeā: ā0755ā, āownerā: āwebā, āpathā: ā/srv/www/bedrock.com/shared/uploadsā, āsizeā: 4096, āstateā: ādirectoryā, āuidā: 1000}
TASK: [deploy | Ensure shared paths are absent] *******************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE file path=ā/srv/www/bedrock.com/releases/20150423202404/web/app/uploadsā state=absent
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731 && echo $HOME/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmp5u0uyr TO /home/web/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731/file
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731/file; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835258.76-200400019701731/ >/dev/null 2>&1ā
ok: [45.55.241.241] => (item={āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}) => {āchangedā: false, āitemā: {āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}, āpathā: ā/srv/www/bedrock.com/releases/20150423202404/web/app/uploadsā, āstateā: āabsentā}
TASK: [deploy | Create shared symlinks] ***************************************
<45.55.241.241> ESTABLISH CONNECTION FOR USER: web
<45.55.241.241> REMOTE_MODULE file path=ā/srv/www/bedrock.com/releases/20150423202404/web/app/uploadsā src=ā/srv/www/bedrock.com/shared/uploadsā state=link
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āmkdir -p $HOME/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629 && echo $HOME/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629ā
<45.55.241.241> PUT /var/folders/xy/1kc57lfs7rn18nrjdpypxmxh0000gn/T/tmpxkJXPk TO /home/web/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629/file
<45.55.241.241> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=ā/Users/danielbell/.ansible/cp/ansible-ssh-%h-%p-%rā -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=web -o ConnectTimeout=10 45.55.241.241 /bin/sh -c āLANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/web/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629/file; rm -rf /home/web/.ansible/tmp/ansible-tmp-1429835259.8-233836316771629/ >/dev/null 2>&1ā
failed: [45.55.241.241] => (item={āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}) => {āfailedā: true, āitemā: {āpathā: āweb/app/uploadsā, āsrcā: āuploadsā}, āpathā: ā/srv/www/bedrock.com/releases/20150423202404/web/app/uploadsā, āstateā: āabsentā}
msg: Error while linking: [Errno 2] No such file or directory
FATAL: all hosts have already failed ā aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/danielbell/deploy.retry
45.55.241.241 : ok=11 changed=4 unreachable=0 failed=1
Going to open up a new topic with this new issue. I guess Iāll consider this solved for now even though I foresee this becoming a hassle. Iāll see if the rest of the team runs into the same issue before I worry about it too much.
Thanks again for all your help!
Whatās your folder structure of the repository you deployed like? Is Bedrock the root folder? Or a sub-folder like we have here: https://github.com/roots/roots-example-project.com
If so, you need to set subtree
like here
Ok, that deffinetly sounds like it could be part of the issue. However when I add that like so:
local_path: āā¦/bedrockā # path targeting local Bedrock project directory (relative to Ansible root)
repo: git@bitbucket.org:newbird/bedrock.git
subtree: bedrock
multisite:
enabled: false
subdomains: false
and then try to deploy again, I get this:
TASK: [deploy | Move project subtree into root folder] ************************
fatal: [45.55.241.241] => error while evaluating conditional: bedrock
What version of Ansible are you running?
Stupid question (just because Iām on the cusp of jumping into the same challenge getting this configured as well, and Iām watching with great interest), butā¦ why is the github_ssh_keys
list thusly named?
How does github factor into the deployment at all if my/whomeverās project isnāt hosted on github?
And doesnāt the bedrock-ansible deployment use the local dev files to produce and transmit the deployment to staging/prod (or if I donāt even have a github account)?
How can we simply reference an ssh key that exists on our local machine to authenticate the deployment?
I believe I have the most recent version considering I just installed this 3 days ago. But, just in case, how do I check which version I am currently using?
@timichango I think github ssh is used so the production server can clone the github repo etc. Itās like a 3 way communication, between
local <-> production server <-> github repo (and github <-> local of course)
So in a way all 3 need to be connected with ssh keys. For some of the above errors, i had to login to the DO droplet (after provision) as āwebā user and create a SSH key for him and add it to github. And then try the deploy.
Although i get he same error: error while evaluating conditional at end.
Hereās my understanding. Corrections welcome.
Q. How does ārootā connect to remote (e.g., to run server.yml
playbook)?
A. ārootā uses pub key you added when initially spinning up DO droplet
Q. How does āwebā user connect to remote (e.g., to run deploy.yml
playbook)?
A. āwebā user uses pub key added to remote for āwebā user.
Q. Wait, how was a pub key added to remote for āwebā user?
A. If you defined the github_ssh_keys
dictionary, the server.yml
playbook used that info to retrieve the public key from github and load it on your remote for āwebā to use.
Q. Why not just have bedrock-ansible copy up my pub key instead going to github to get it?
A. Itās a mere convenience, but also, what if you want to add a pub key for ārandomguyā user so he can deploy too, but you donāt have that key on your local machine? Just add randomguyās github username to the github_ssh_keys
list and bedrock-ansible will get it for you (courtesy of the exceptionally intelligent @austinpray here).
Q. Errā¦ but if I donāt have my pub key on github and donāt want to add itā¦ how do I get a pub key on remote server for āwebā user to use?
A. Manually load up your pub key on the remote for āwebā user (e.g., after running server.yml
. Lots of searchable info out there on how.
Q. How does my remote server make the connection to a private repo (github or other) to clone/install?
A. github_ssh_keys
actually doesnāt have anything to do with this. You should have SSH Forwarding set up, which allows the remote server to use your local machineās credentials to connect to the private repo.
Q. So, whatās with the name github_ssh_keys
again?
A. Itās not that you use these keys to connect to a github repo (deploy.yml
will use ssh forwarding to connect to private repo). Rather, bedrock-ansible will conveniently fetch any pub ssh keys from github that you specify, then load them on the server for users to use (like for āwebā user).
Q. I want more of this ssh stuff. MORE!
A. see the SSH Keys wiki
Q. So, how do I get some files on the server if I donāt want to have the server clone them from a repo?
A. Check out how bedrock-ansible makes it possible to sync files from your local machine upon each deployment.
Q. How do I check my Ansible version?
A. Lots of searchable info on this out there.
@darjanpanic Regarding āerror while evaluating conditionalā, I suspect your group_vars/<environment>
files may be missing the ssl enabled false info like this, but not sure without more details. If the problem persists, you could start a new thread.
Letās put any new specific and focused questions in new threads.
@timichango Iād recommend adding your key to github and using bedrock-ansibleās defaults for loading up your key. That way you wouldnāt have to maintain an alteration to bedrock-ansibleās roles.
But Ansibleās authorized_key module makes it easy to load a key from your local machine to the server. If I were doing it, Iād add a task at the end of roles/users/tasks/main.yml
:
- name: Add SSH key for web user
authorized_key: user="{{ web_user }}" key="{{ lookup('file', '/local/path/to/public/key/id_rsa.pub') }}"
(wish those lines werenāt wrapping)
Iām having the same issue. The problem Iāve noticed is with the port :22. Iāve created the secure admin sudo user and password and can login to the droplet just fine with an ssh command. But if I try to ssh into the server:22, it tells me āCould not resolve hostname ...*:22: nodename nor servname provided, or not knownā
Could this have to do with it?