I'm putting together a small ansible playbook to deploy a jekyll site and I'm running into some issues when running a task to update the codebase dependencies with bundler. I've tried debugging with the -vvv
command line option and can't see anything obvious.
The target system is a default Ubuntu install with ruby, bundler, and a few other packages installed.
I've stripped everything down to the most basic example of the issue:
---
- hosts: all
vars:
location: /var/www/acodeninja.github.io
tasks:
- name: update codebase dependancies
bundler:
state: latest
chdir: "{{ location }}/"
This runs but then hangs at the following stage:
TASK [update codebase dependancies]
task path: /home/lawrence/code/app-manager/tests/files/test-deployment.yml:6
If I alter the playbook to just run bundler using the command module I get the same issue:
---
- hosts: all
vars:
location: /var/www/acodeninja.github.io
tasks:
- name: update codebase dependancies
command: bundle install
args:
chdir: "{{ location }}/"
Running supposedly the same command on the terminal we get an almost instant completion (using either bundle
or bundler
):
/var/www/acodeninja.github.io on master
$ bundle install
Using public_suffix 3.0.1
Using addressable 2.5.2
...
Using jekyll 3.6.2
Using jekyll-feed 0.9.2
Using jekyll-paginate 1.1.0
Using minima 2.1.1
Bundle complete! 5 Gemfile dependencies, 24 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
/var/www/acodeninja.github.io on master
$
Any suggestions on how to solve this issue or if this might be a bug in ansible would be great.
EDIT
The full playbook can be found here: https://gist.github.com/acodeninja/fb082cebec579db50c1b57303a8bbf77
Command being used to run playbook: ansible-playbook files/test-deployment.yml --ask-become-pass -vvv