Commit 75dcf6ac authored by Chris Croome's avatar Chris Croome

check the package fd size

parent e6804eac
Pipeline #3497 failed with stage
in 1 minute and 57 seconds
#!/bin/bash
PHP_CONFIG=$(which php-config)
if [[ "${PHP_CONFIG}" == "" ]]; then;
echo "This script depends on php-config which is in the php-dev package"
exit 1
else
PHP_FD_SIZE=$(${PHP_CONFIG} --configure-options | sed 's/\s\+/\n/g' | grep enable-fd-setsize | sed 's/^--enable-fd-setsize=//' )
if [[ "${PHP_FD_SIZE}" != "" ]]; then;
echo "${PHP_FD_SIZE}"
exit 0
else
echo "There was a problem getting the PHP enable-fd-setsize configure variable"
exit 1
fi
fi
......@@ -8,29 +8,25 @@
- name: Add local repo to sources
shell: "echo 'deb file:/build/repo {{ php_distro }} main' > /etc/apt/sources.list.d/local.list"
#- name: Get the version number we want to install
# shell: "ls /build/repo/pool/main/p/php{{ php_version }}/php{{ php_version }}_*.deb | sed 's;^/build/repo/pool/main/p/php{{ php_version }}/php{{ php_version }}_;;' | sed 's/_all.deb$//'"
# register: php_deb_version
# args:
# - warn: no
- name: Install PHP Dev package
apt:
pkg:
- "php{{ php_version }}-dev"
# - "php{{ php_version }}-dev={{ php_deb_version.stdout }}"
state: latest
update_cache: yes
- name: Script to get the enable-fd-setsize configure option from the installed package in place
copy:
src: files/php-enable-fd-setsize.sh
dest: /usr/local/bin/php-enable-fd-setsize.sh
mode: 0755
- name: Get the enable-fd-setsize configure option from the installed package
command: php-config --configure-options
command: /usr/local/bin/php-enable-fd-setsize.sh
register: php_fd_size
args:
- warn: no
#- name: Get the enable-fd-setsize configure option from the installed package
# shell: 'php-config --configure-options | sed "s/\s\+/\n/g" | grep enable-fd-setsize | sed "s/^--enable-fd-setsize=//"'
# register: php_fd_size
# args:
# - warn: no
#
#- name: Fail if the installed version of PHP doesn't have the correct number of file descriptors enabled
# fail:
# when: php_sockets != php_fd_size.stdout
- name: Fail if the installed version of PHP doesn't have the correct number of file descriptors enabled
fail:
when: php_sockets != php_fd_size.stdout
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment