---
- hosts: 'localhost'
tasks:
- name: Get build path
shell: echo $(dirname `pwd`)
register: build_path
- debug: msg="Using build path {{ build_path.stdout }}"
- name: Pull down composer file
get_url: url=https://getcomposer.org/composer.phar dest="{{build_path.stdout}}/src" mode=0755
- name: Composer install
command: php composer.phar install -vvv --no-interaction
args:
chdir: ../src
tags: composer
$ nice -n 10 ansible-playbook -vvv composer.yaml
No config file found; using defaults
PLAYBOOK: composer.yaml ********************************************************
1 plays in composer.yaml
PLAY [localhost] ***************************************************************
TASK [setup] *******************************************************************
Using module file /usr/local/Cellar/ansible/2.2.0.0_2/libexec/lib/python2.7/site-packages/ansible/modules/core/system/setup.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: myuser
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242 `" && echo ansible-tmp-1483513103.69-255753035801242="` echo $HOME/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242 `" ) && sleep 0'
<127.0.0.1> PUT /var/folders/vk/9pn28vl173j5d7v7dtw_vr_9f96tm9/T/tmpxry3gN TO /Users/myuser/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242/setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /Users/myuser/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242/ /Users/myuser/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242/setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/local/Cellar/ansible/2.2.0.0_2/libexec/bin/python2.7 /Users/myuser/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242/setup.py; rm -rf "/Users/myuser/.ansible/tmp/ansible-tmp-1483513103.69-255753035801242/" > /dev/null 2>&1 && sleep 0