Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

Commit

Permalink
Merge pull request #169 from thom8/upload_progress
Browse files Browse the repository at this point in the history
Added beetbox-upload-progress role and made a dependancy of drupal
  • Loading branch information
thom8 committed Mar 10, 2016
2 parents d887f9e + 1041534 commit ce48702
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions provisioning/ansible/roles/beetbox-drupal/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
dependencies:
- { role: beetbox-upload-progress }
- { role: geerlingguy.drush }

# Conditionally-installed roles.
Expand Down
7 changes: 7 additions & 0 deletions provisioning/ansible/roles/beetbox-tests/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@
register: php_modules
changed_when: false
failed_when: "'xdebug' not in php_modules.stdout"

- name: Test uploadprogress is available.
shell: >
php -m
register: php_modules
changed_when: false
failed_when: "'uploadprogress' not in php_modules.stdout"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
workspace: /tmp

php_uploadprogress_module_path: /usr/lib/php5/modules
php_uploadprogress_config_filename: 20-uploadprogress.ini
47 changes: 47 additions & 0 deletions provisioning/ansible/roles/beetbox-upload-progress/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
- name: Download and untar uploadprogress.
unarchive:
src: "https://github.com/php/pecl-php-uploadprogress/archive/master.tar.gz"
dest: "{{ workspace }}"
copy: no

- name: Build uploadprogress.
shell: >
{{ item }}
chdir={{ workspace }}/pecl-php-uploadprogress-master
creates={{ workspace }}/pecl-php-uploadprogress-master/modules/uploadprogress.so
with_items:
- phpize
- ./configure
- make
notify: restart webserver

- name: Ensure uploadprogress module path exists.
file:
path: "{{ php_uploadprogress_module_path }}"
state: directory
owner: root
group: root
mode: 0755

- debug: msg="{{ workspace }}/pecl-php-uploadprogress-master/modules/uploadprogress.so"

- name: Move uploadprogress module into place.
copy:
src: "{{ workspace }}/pecl-php-uploadprogress-master/modules/uploadprogress.so"
dest: "{{ php_uploadprogress_module_path }}/uploadprogress.so"
owner: root
group: root
mode: 0755
notify: restart webserver

- name: Add php extension config for uploadprogress.
template:
src: uploadprogress.ini.j2
dest: "{{ item }}/{{ php_uploadprogress_config_filename }}"
owner: root
group: root
force: yes
mode: 0644
with_items: "{{ php_extension_conf_paths }}"
notify: restart webserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
; activate and configurate for php uploadprogress module
extension={{ php_uploadprogress_module_path }}/uploadprogress.so

0 comments on commit ce48702

Please sign in to comment.