Skip to content

Commit

Permalink
Fix failing test, require Ansible 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Sep 15, 2016
1 parent d960652 commit 713c923
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
- distro: ubuntu1604
init: /lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
- distro: debian8
init: /lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"

services:
- docker
Expand Down Expand Up @@ -40,7 +43,7 @@ script:
|| (echo 'Idempotence test: fail' && exit 1)
# Run script to test if Xdebug is available and working.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm php /etc/ansible/roles/role_under_test/tests/xdebug-test.php'
- 'sudo docker exec "$(cat ${container_id})" env TERM=xterm php /etc/ansible/roles/role_under_test/tests/xdebug-test.php'

after_success:
# Clean up.
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ galaxy_info:
description: PHP XDebug for Linux
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 1.8
min_ansible_version: 2.0
platforms:
- name: EL
versions:
Expand Down
18 changes: 5 additions & 13 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,23 @@
include_vars: "{{ ansible_os_family }}.yml"

- name: Ensure dependencies for building from source are installed (RedHat).
yum: "pkg={{ item }} state=installed"
yum: "name={{ item }} state=installed"
with_items:
- make
- '@development'
when: ansible_os_family == 'RedHat'

- name: Ensure dependencies for building from source are installed (Debian).
apt: "pkg={{ item }} state=installed"
apt: "name={{ item }} state=installed"
with_items:
- make
- build-essential
when: ansible_os_family == 'Debian'

- name: Download Xdebug.
get_url:
url: "https://xdebug.org/files/xdebug-{{ php_xdebug_version }}.tgz"
dest: "{{ workspace }}/xdebug-{{ php_xdebug_version }}.tgz"

# TODO: In 2.0, we can set the 'src' to the URL from the get_url task above and
# cut out one extra task :)
- name: Untar Xdebug.
unarchive:
src: "{{ workspace }}/xdebug-{{ php_xdebug_version }}.tgz"
src: "https://xdebug.org/files/xdebug-{{ php_xdebug_version }}.tgz"
dest: "{{ workspace }}"
copy: no


- name: Build Xdebug.
shell: >
{{ item }}
Expand Down

0 comments on commit 713c923

Please sign in to comment.