File: ansible/roles/php/tasks/pecl.yml

Recommend this page to a friend!
  Classes of Omar Shaban  >  PHP Game of Three  >  ansible/roles/php/tasks/pecl.yml  >  Download  
File: ansible/roles/php/tasks/pecl.yml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Game of Three
Game of Three implementation using Websockets
Author: By
Last change:
Date: 3 months ago
Size: 770 bytes
 

Contents

Class file image Download
- name: Install
  apt: pkg="php5-dev" state=present
  when: php.pecl_packages is defined

- name: Install Package
  shell: echo "\n\n\n\n\n\n\n\n\n" | pecl install {{ item }}
  register: pecl_result
  changed_when: "'already installed' not in pecl_result.stdout"
  failed_when: "pecl_result.stderr or ('ERROR' in pecl_result.stdout)"
  with_items: php.pecl_packages
  when: php.pecl_packages is defined

- name: Create extension .ini file
  template: >
    src="extension.tpl"
    dest="/etc/php5/mods-available/{{ item }}.ini"
    owner="root"
    group="root"
    mode=0644
  with_items: php.pecl_packages
  when: php.pecl_packages is defined

- name: Enable extension
  shell: php5enmod {{ item }}
  with_items: php.pecl_packages
  when: php.pecl_packages is defined
For more information send a message to info at phpclasses dot org.