Hi all,
I’m relatively new to ansible, I’ve used it for a small work project, and am now trying to use it to deploy a rails app I’ve been working on.
Michael DeHaan sent me here from twitter, so here goes.
Long story short, things go great until I try to clone the project from my bitbucket repository. I’ll try to itemize what I’ve done, and provide the proper output.
- Here are the relevant tasks. I’m chmod-ing the directory to 0777 right now to see if that helped solve things, which it didn’t. target = /var/www/kodiak and repo is my private git repository.
-
name: create kodiak directory
file: path={{ target }} state=directory group=www-data owner=www-data mode=0777 -
name: git clone kodiak
git: repo={{repo}} dest={{ target }} accept_hostkey=True key_file=“/home/ansible/.ssh/id_rsa.pub” version=master
Here’s the output, in full, so apologies in advance for a wall of text:
devin@kodiak-dev:~/projects/stonecolddev.in-ansible$ ansible-playbook -vvvv -s -i production site.yml
PLAY [Kodiak App Setup] *******************************************************
GATHERING FACTS ***************************************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE setup
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553 && echo $HOME/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553’”]
<stonecolddev.in> PUT /tmp/tmpVkAUII TO /home/ansible/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553/setup
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=byhlknjhzwgecbtpqvowqnekgkirrupw] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-byhlknjhzwgecbtpqvowqnekgkirrupw; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553/setup; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663976.34-3372550724553/ >/dev/null 2>&1'”'"''']
ok: [stonecolddev.in]
PLAY [webservers] *************************************************************
GATHERING FACTS ***************************************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE setup
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457 && echo $HOME/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457’”]
<stonecolddev.in> PUT /tmp/tmpdjyuZ3 TO /home/ansible/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457/setup
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=ywunhlgmuvvjrorbuvaivfwfmacckxrj] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-ywunhlgmuvvjrorbuvaivfwfmacckxrj; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457/setup; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663979.54-67425359821457/ >/dev/null 2>&1'”'"''']
ok: [stonecolddev.in]
TASK: [common | Set up authorized_keys for the deploy user] *******************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE authorized_key user=ansible key=“ssh-rsa***”
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184 && echo $HOME/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184’”]
<stonecolddev.in> PUT /tmp/tmpP9hev9 TO /home/ansible/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184/authorized_key
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=ufnrcdwpdthgoesldjcqtowlsfvcsidy] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-ufnrcdwpdthgoesldjcqtowlsfvcsidy; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184/authorized_key; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663983.29-31466955359184/ >/dev/null 2>&1'”'“''']
ok: [stonecolddev.in] => (item=ssh-rsa ****”, “key_options”: null, “keyfile”: “/home/ansible/.ssh/authorized_keys”, “manage_dir”: true, “path”: null, “state”: “present”, “unique”: false, “user”: “ansible”}
TASK: [common | Install curl, wget and ca-certificates] ***********************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE apt name=wget,ca-certificates,curl,ferm state=present update_cache=yes
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065 && echo $HOME/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065’”]
<stonecolddev.in> PUT /tmp/tmpgWPTLp TO /home/ansible/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065/apt
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=rmhsbnqudvmhiezluhoiggaaqqyviyvy] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-rmhsbnqudvmhiezluhoiggaaqqyviyvy; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065/apt; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663986.1-48019923164065/ >/dev/null 2>&1'”'"''']
ok: [stonecolddev.in] => (item=wget,ca-certificates,curl,ferm) => {“changed”: false, “item”: “wget,ca-certificates,curl,ferm”}
TASK: [common | Copy firewall config] *****************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=hueettdcqubcdeljtdbmcsioguskaymu] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-hueettdcqubcdeljtdbmcsioguskaymu; rc=0; [ -r “/etc/ferm/ferm.conf” ] || rc=2; [ -f “/etc/ferm/ferm.conf” ] || rc=1; [ -d “/etc/ferm/ferm.conf” ] && echo 3 && exit 0; (/usr/bin/md5sum /etc/ferm/ferm.conf 2>/dev/null) || (/sbin/md5sum -q /etc/ferm/ferm.conf 2>/dev/null) || (/usr/bin/digest -a md5 /etc/ferm/ferm.conf 2>/dev/null) || (/sbin/md5 -q /etc/ferm/ferm.conf 2>/dev/null) || (/usr/bin/md5 -n /etc/ferm/ferm.conf 2>/dev/null) || (/bin/md5 -q /etc/ferm/ferm.conf 2>/dev/null) || (/usr/bin/csum -h MD5 /etc/ferm/ferm.conf 2>/dev/null) || (/bin/csum -h MD5 /etc/ferm/ferm.conf 2>/dev/null) || (echo “${rc} /etc/ferm/ferm.conf”)'”'“''‘]
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057 && echo $HOME/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057’”]
<stonecolddev.in> PUT /tmp/tmpxwnH_k TO /home/ansible/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057/file
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=agtwtgvuuhymgjshllewfybuhsotcgou] password: " -u root /bin/sh -c '”'”'echo SUDO-SUCCESS-agtwtgvuuhymgjshllewfybuhsotcgou; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057/file; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663993.53-33358864902057/ >/dev/null 2>&1'“'”''']
ok: [stonecolddev.in] => {“changed”: false, “dest”: “/etc/ferm/ferm.conf”, “gid”: 4, “group”: “adm”, “md5sum”: “c6da5230ad75384c209f50dc0e8d36aa”, “mode”: “0644”, “owner”: “root”, “path”: “/etc/ferm/ferm.conf”, “size”: 599, “state”: “file”, “uid”: 0}
TASK: [common | service name=ferm state=running enabled=yes] ******************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE service name=ferm state=running enabled=yes
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123 && echo $HOME/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123’”]
<stonecolddev.in> PUT /tmp/tmp7LzZRy TO /home/ansible/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123/service
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=dqjvzzhrgajgcgptgsdfansnprydccbv] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-dqjvzzhrgajgcgptgsdfansnprydccbv; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123/service; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663996.3-231152159687123/ >/dev/null 2>&1'”'"''']
changed: [stonecolddev.in] => {“changed”: true, “enabled”: true, “name”: “ferm”, “state”: “started”}
TASK: [webtier | Install required web related applications] *******************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE apt name=nginx state=present
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327 && echo $HOME/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327’”]
<stonecolddev.in> PUT /tmp/tmpp3RzWm TO /home/ansible/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327/apt
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=dvibwolkfkdzfqaxnmtrxworrpezivzj] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-dvibwolkfkdzfqaxnmtrxworrpezivzj; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327/apt; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410663999.25-81835892465327/ >/dev/null 2>&1'”'"''']
ok: [stonecolddev.in] => (item=nginx) => {“changed”: false, “item”: “nginx”}
TASK: [webtier | Install RVM] *************************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE command curl -sSL https://get.rvm.io | bash -s stable --gems=rails,puma executable=/bin/bash #USE_SHELL
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727 && echo $HOME/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727’”]
<stonecolddev.in> PUT /tmp/tmpjcDO8j TO /home/ansible/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727/command
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=lxgskeedwewlymrfyzezopllktvhvhoe] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-lxgskeedwewlymrfyzezopllktvhvhoe; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727/command; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410664002.27-150091890540727/ >/dev/null 2>&1'”'"''']
changed: [stonecolddev.in] => {“changed”: true, “cmd”: “curl -sSL https://get.rvm.io | bash -s stable --gems=rails,puma”, “delta”: “0:00:23.506878”, “end”: “2014-09-13 20:07:10.002946”, “rc”: 0, “start”: “2014-09-13 20:06:46.496068”, “stderr”: “In case of problems: \u001b[32mhttp://rvm.io/help \u001b[33mand \u001b[32mhttps://twitter.com/rvm_io\n * No new notes to display.\n\nAlready installed ruby-2.1.2.\nTo reinstall use:\n\n rvm reinstall ruby-2.1.2”, “stdout”: “Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz\n\nUpgrading the RVM installation in /usr/local/rvm/\nUpgrade of RVM in /usr/local/rvm/ is complete.\n\n# ansible,\n#\n# Thank you for using RVM!\n# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!\n#\n# ~Wayne, Michal & team.\n\n\nUpgrade Notes:\n\nrvm 1.25.30 (stable) by Wayne E. Seguin wayneeseguin@gmail.com, Michal Papis mpapis@gmail.com [https://rvm.io/]\n\u001b[32mCreating alias default for ruby-2.1.2\u001b[0m|\b/\b-\b\\b|\b/\b-\b\\b|\b.-\b\\b|\b/\b-\b\\b|\b/\b-\b.|\b/\b-\b\\b|\b/\b-\b\\b|\b.-\b\\b|\b/\b-\b\\b|\b/\b.\nSuccessfully installed rails-4.1.6\nParsing documentation for rails-4.1.6\nDone installing documentation for rails after 0 seconds\n1 gem installed\nBuilding native extensions. This could take a while…\nSuccessfully installed puma-2.9.1\nParsing documentation for puma-2.9.1\nDone installing documentation for puma after 0 seconds\n1 gem installed\n\n * To start using RVM you need to run source /usr/local/rvm/scripts/rvm
\n in all your open shell windows, in rare cases you need to reopen all shell windows.\n\n * To start using rails you need to run rails new <project_dir>
.”}
TASK: [webtier | Copy nginx config] *******************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=kwbwwbdrinahciltsrnyrwpbdfxpbtby] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-kwbwwbdrinahciltsrnyrwpbdfxpbtby; rc=0; [ -r “/etc/nginx/conf.d/stonecolddev.in.conf” ] || rc=2; [ -f “/etc/nginx/conf.d/stonecolddev.in.conf” ] || rc=1; [ -d “/etc/nginx/conf.d/stonecolddev.in.conf” ] && echo 3 && exit 0; (/usr/bin/md5sum /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/sbin/md5sum -q /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/usr/bin/digest -a md5 /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/sbin/md5 -q /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/usr/bin/md5 -n /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/bin/md5 -q /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/usr/bin/csum -h MD5 /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (/bin/csum -h MD5 /etc/nginx/conf.d/stonecolddev.in.conf 2>/dev/null) || (echo “${rc} /etc/nginx/conf.d/stonecolddev.in.conf”)'”'“''‘]
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711 && echo $HOME/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711’”]
<stonecolddev.in> PUT /tmp/tmpjluIgp TO /home/ansible/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711/file
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=jvbkrusklaevfbeblbkvptcujtkgehdx] password: " -u root /bin/sh -c '”'”'echo SUDO-SUCCESS-jvbkrusklaevfbeblbkvptcujtkgehdx; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711/file; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410664029.42-248310933046711/ >/dev/null 2>&1'“'”''']
ok: [stonecolddev.in] => {“changed”: false, “dest”: “/etc/nginx/conf.d/stonecolddev.in.conf”, “gid”: 33, “group”: “www-data”, “md5sum”: “0442d3ccd2ba3aa2b8ebeb1cddf78b20”, “mode”: “0644”, “owner”: “www-data”, “path”: “/etc/nginx/conf.d/stonecolddev.in.conf”, “size”: 591, “state”: “file”, “uid”: 33}
TASK: [webtier | service name=nginx state=running enabled=yes] ****************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE service name=nginx state=running enabled=yes
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185 && echo $HOME/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185’”]
<stonecolddev.in> PUT /tmp/tmpThAOdZ TO /home/ansible/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185/service
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=vfgjrjupakxvfkuynenwexjputwxbzjb] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-vfgjrjupakxvfkuynenwexjputwxbzjb; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185/service; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410664032.36-176743459758185/ >/dev/null 2>&1'”'"''']
ok: [stonecolddev.in] => {“changed”: false, “enabled”: true, “name”: “nginx”, “state”: “started”}
TASK: [webtier | create kodiak directory] *************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE file path=/var/www/kodiak state=directory group=www-data owner=www-data mode=0777
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751 && echo $HOME/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751’”]
<stonecolddev.in> PUT /tmp/tmpvOFva0 TO /home/ansible/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751/file
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=sfillwoutrarozvljvlxwlylgivagoeo] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-sfillwoutrarozvljvlxwlylgivagoeo; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751/file; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410664036.69-223991752453751/ >/dev/null 2>&1'”'"''']
changed: [stonecolddev.in] => {“changed”: true, “gid”: 33, “group”: “www-data”, “mode”: “0777”, “owner”: “www-data”, “path”: “/var/www/kodiak”, “size”: 4096, “state”: “directory”, “uid”: 33}
TASK: [webtier | git clone kodiak] ********************************************
<stonecolddev.in> ESTABLISH CONNECTION FOR USER: ansible
<stonecolddev.in> REMOTE_MODULE git repo=git@bitbucket.org:djaustin/stonecolddev.in.git dest=/var/www/kodiak accept_hostkey=True key_file=“/home/ansible/.ssh/id_rsa.pub” version=master
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548 && echo $HOME/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548’”]
<stonecolddev.in> PUT /tmp/tmpFRgQcS TO /home/ansible/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548/git
<stonecolddev.in> EXEC [‘ssh’, ‘-C’, ‘-tt’, ‘-vvv’, ‘-o’, ‘ForwardAgent=yes’, ‘-o’, ‘Port=1023’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=ansible’, ‘-o’, ‘ConnectTimeout=10’, ‘stonecolddev.in’, u’/bin/sh -c 'sudo -k && sudo -H -S -p “[sudo via ansible, key=blpsonksbybhvcorlwoxrzvsugxlptkf] password: " -u root /bin/sh -c '”'“'echo SUDO-SUCCESS-blpsonksbybhvcorlwoxrzvsugxlptkf; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548/git; rm -rf /home/ansible/.ansible/tmp/ansible-tmp-1410664039.67-98248669836548/ >/dev/null 2>&1'”'"''']
The last task just hangs. It hung all night, in fact. I’m at a bit of a loss, as I’ve looked at this: http://stackoverflow.com/questions/21427577/git-over-ssh-in-ansible-hangs-eventhough-ssh-agent-forwarding-is-set-up, this: http://stackoverflow.com/questions/20136358/ansible-git-module-is-hanging and this: http://www.tomaz.me/2013/10/14/solution-for-ansible-git-module-getting-stuck-on-clone.html, but none of those seem to do the trick. I’m able to clone the repository if I run git clone … on my machine, both to the ansible user’s home directory and in /var/www/kodiak (albeit with 0777 permissions).
Any thoughts are appreciated.
Thanks,
-Devin