Finish the installation and check tasks

This commit is contained in:
Sergey Fayngold 2014-02-04 13:57:47 +01:00
parent 7ca2e55d0b
commit 4e69bf2ce6
3 changed files with 31 additions and 4 deletions

View file

@ -1,2 +1,8 @@
---
# defaults file for composer
composer_apt_packages:
- php5-cli
- curl
composer_download_url: https://getcomposer.org/composer.phar
composer_download_force: no

View file

@ -4,9 +4,16 @@ galaxy_info:
license: BSD
min_ansible_version: 1.2
platforms:
- name: GenericUNIX
- name: Ubuntu
versions:
- any
- all
- name: Debian
versions:
- all
#
# Below are all categories currently available. Just as with
# the platforms above, uncomment those that apply to your role.
#
categories:
- packaging
- system

View file

@ -1,2 +1,16 @@
---
# tasks file for composer
- name: Install the required packages
apt: name={{ item }} state=present update_cache=yes
with_items: composer_apt_packages
when: ansible_os_family == "Debian"
tags: [packages,composer]
- name: Download composer
get_url: url={{ composer_download_url }} dest=/usr/local/bin/composer force={{ composer_download_force }} mode=755
tags: [packages,composer]
- name: Check the installation
command: composer -V --no-ansi
register: composer_result
changed_when: "'Composer version' in composer_result.stdout"
failed_when: "'Composer version' not in composer_result.stdout"