Newer
Older

jurgenhaas
committed
---
# file: roles/php/tasks/msodbc.yml

jurgenhaas
committed
apt_key:
url: 'https://packages.microsoft.com/keys/microsoft.asc'

jurgenhaas
committed

jurgenhaas
committed
apt_repository:
repo: 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod {{ ansible_distribution_release }} main'

jurgenhaas
committed
debconf:
name: "{{ item }}-installer"
question: "{{ item }}/accept_eula"
value: "true"
vtype: "select"
with_items:

jurgenhaas
committed
apt:
pkg: '{{ packages }}'

jurgenhaas
committed
update_cache: yes
vars:
packages:
- msodbcsql
- mssql-tools
- unixodbc-dev

jurgenhaas
committed
notify:

jurgenhaas
committed
- name: PHP | Install PECL packages
shell: pecl install --soft {{ item }}

jurgenhaas
committed
with_items:

jurgenhaas
committed

jurgenhaas
committed
copy:
content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root
group: root

jurgenhaas
committed
with_items:

jurgenhaas
committed
notify:

jurgenhaas
committed
- name: Enable extensions
shell: phpenmod {{ item }}

jurgenhaas
committed
with_items:

jurgenhaas
committed
notify: