-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #981 from enterprisemediawiki/30.x-php7
Use PHP7
- Loading branch information
Showing
11 changed files
with
196 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
|
||
- name: Ensure prerequisites for sqlsrv in place | ||
yum: | ||
name: "{{item}}" | ||
state: installed | ||
with_items: | ||
- re2c | ||
- gcc-c++ | ||
|
||
# Install ODBC driver | ||
- name: install mssql-server repo (CentOS, RedHat) | ||
get_url: | ||
url: https://packages.microsoft.com/config/rhel/7/prod.repo | ||
dest: /etc/yum.repos.d/mssql-release.repo | ||
when: ansible_distribution in ['CentOS', 'RedHat'] | ||
|
||
- name: Ensure conflicting ODBC drivers removed | ||
yum: | ||
name: "{{item}}" | ||
state: absent | ||
with_items: | ||
- unixODBC-utf16 | ||
- unixODBC-utf16-devel | ||
|
||
- name: install MS ODBC driver package | ||
yum: | ||
name: msodbcsql17 | ||
state: latest | ||
environment: | ||
ACCEPT_EULA: 'y' | ||
notify: | ||
- restart apache | ||
|
||
- name: install ODBC driver devel package | ||
yum: | ||
name: unixODBC-devel | ||
state: latest | ||
|
||
|
||
# If mssql tools desired: | ||
# sudo ACCEPT_EULA=Y yum install mssql-tools | ||
# echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile | ||
# echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc | ||
# source ~/.bashrc | ||
|
||
|
||
# | ||
# Compiling the PHP drivers with PECL with PHP 7.2 requires a more recent GCC than the default: | ||
# | ||
# | ||
# # CENTOS: sudo yum install centos-release-scl | ||
# - name: install centos-release-scl | ||
# yum: | ||
# name: centos-release-scl | ||
# state: latest | ||
# when: ansible_distribution == "CentOS" | ||
# | ||
# - name: install devtoolset-7 on CentOS | ||
# yum: | ||
# name: devtoolset-7 | ||
# state: latest | ||
# when: ansible_distribution == "CentOS" | ||
# | ||
# # REDHAT: sudo yum-config-manager --enable rhel-server-rhscl-7-rpms | ||
# - name: enable rhel-server-rhscl-7-rpms | ||
# yum: | ||
# name: devtoolset-7 | ||
# state: latest | ||
# enablerepo: rhel-server-rhscl-7-rpms | ||
# when: ansible_distribution == "RedHat" | ||
# | ||
# - name: Enable devtoolset-7 with SCL | ||
# shell: "scl enable devtoolset-7 bash" | ||
|
||
|
||
# | ||
# Install sqlsrv drivers from PECL | ||
# | ||
# Or maybe this is better? | ||
# sudo pecl install sqlsrv-5.2.0 | ||
# sudo pecl install pdo_sqlsrv-5.2.0 | ||
# | ||
- name: Install sqlsrv and pdo_sqlsrv PECL packages | ||
pear: | ||
name: "{{ item }}" | ||
state: present | ||
with_items: | ||
- pecl/sqlsrv | ||
- pecl/pdo_sqlsrv | ||
notify: | ||
- restart apache | ||
|
||
- template: | ||
src: 30-pdo_sqlsrv.ini.j2 | ||
dest: /etc/php.d/30-pdo_sqlsrv.ini | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- restart apache | ||
|
||
- template: | ||
src: 20-sqlsrv.ini.j2 | ||
dest: /etc/php.d/20-sqlsrv.ini | ||
owner: root | ||
group: root | ||
mode: 0644 | ||
notify: | ||
- restart apache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extension=sqlsrv.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
extension=pdo_sqlsrv.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters