Skip to content
Snippets Groups Projects
Commit 1c7a99a6 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/zehnder#317 Add MS ODBC driver to PHP role as an optional package

parent 0dca9404
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@ php_max_file_uploads: '20'
php_max_input_time: '60'
php_max_input_vars: '1000'
php_memory_limit: '32M'
php_needs_msodbc: false
php_needs_oci8: false
php_output_buffering: '4096'
php_post_max_size: '32M'
......
---
# file: roles/php/tasks/msodbc.yml
- name: "Apt Key"
apt_key:
url: 'https://packages.microsoft.com/keys/microsoft.asc'
state: 'present'
- name: "Apt Repository"
apt_repository:
repo: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod {{ ansible_distribution_release }} main'
state: 'present'
mode: '644'
- name: "Install Packages"
apt:
pkg: '{{ item }}'
state: 'installed'
update_cache: yes
with_items:
- 'msodbcsql'
- 'mssql-tools'
- 'unixodbc-dev'
notify:
- "Apache | Restart Apache"
- name: "PHP | Install PECL packages"
shell: 'pecl install {{ item }}'
with_items:
- 'sqlsrv'
- 'pdo_sqlsrv'
- name: "Configuration files"
copy:
content: 'extension={{ item }}.so'
dest: '/etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini'
owner: 'root'
group: 'root'
mode: '644'
with_items:
- 'sqlsrv'
- 'pdo_sqlsrv'
notify:
- "Apache | Restart Apache"
- name: "Enable extensions"
shell: 'phpenmod {{ item }}'
with_items:
- 'sqlsrv'
- 'pdo_sqlsrv'
notify:
- "Apache | Restart Apache"
......@@ -111,6 +111,10 @@
when: repository is defined and php_needs_oci8
tags: 'always'
- include_tasks: msodbc.yml
when: php_needs_msodbc
tags: 'always'
- name: "PHP | Ensure ImageMagick config directory"
file:
dest={{ php_imagick_config_dir }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment