Newer
Older
---
# file: roles/php/tasks/oci-5.3.yml
#
# @see OCI8 Install: https://help.ubuntu.com/community/PHPOracle
# Better:
# @see PDO_OCI Install: https://drupal.org/comment/5572626#comment-5572626
path: /usr/lib/php5/20090626/pdo_oci.so
register: oci_file
- block:
content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root
group: root
- name: PHP | OCI | Remove possible components in /tmp
- instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so
- oracle_x64_11_2_0_3_0_pdo_oci_so
- name: PHP | OCI | Make available Oracle InstantClient
command: scp -r {{ repository }}{{ item }} /tmp/
become: no
with_items:
- instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so
- oracle_x64_11_2_0_3_0_pdo_oci_so
- name: PHP | OCI | Remove /usr/local/lib/instantclient_11_2
path: /usr/local/lib/instantclient_11_2
state: absent
- name: PHP | OCI | Move Oracle InstantClient to /usr/local/lib
command: mv /tmp/instantclient_11_2 /usr/local/lib/
- name: PHP | OCI | Move oci8 to /usr/lib/php5
command: mv /tmp/oracle_x64_11_2_0_3_0_oci8_so /usr/lib/php5/20090626/oci8.so
- name: PHP | OCI | Move pdo_oci to /usr/lib/php5
command: mv /tmp/oracle_x64_11_2_0_3_0_pdo_oci_so /usr/lib/php5/20090626/pdo_oci.so
- name: PHP | OCI | Change ownership for Oracle InstantClient
file:
path: '{{ item }}'
path: /usr/local/lib/instantclient_11_2/log/diag/clients
owner: www-data
group: root
state: directory
- name: Set permissions in log directories
path: /usr/local/lib/instantclient_11_2/log
owner: www-data
group: root
recurse: yes
follow: no
- name: PHP | OCI | Make available libclntsh.so
src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1
dest: /usr/local/lib/instantclient_11_2/libclntsh.so
state: link
when: not oci_file.stat.exists