Skip to content
Snippets Groups Projects
Commit 9830b712 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent 0c8056b2
No related branches found
No related tags found
No related merge requests found
---
php_version: 7.0 php_version: 7.0
php_version_main: 7 php_version_main: 7
php_fpm: true php_fpm: yes
php_fpm_socket: false php_fpm_socket: no
php_install_redis: true php_install_redis: yes
php_hold_version: false php_hold_version: no
php_repositories: [] php_repositories: []
php_packages: php_packages:
- php-apc - php-apc
...@@ -30,34 +32,34 @@ php_base_dir: php5 ...@@ -30,34 +32,34 @@ php_base_dir: php5
php_conf_dir: conf.d php_conf_dir: conf.d
php_imagick_config_dir: /etc/ImageMagick-6 php_imagick_config_dir: /etc/ImageMagick-6
php_allow_call_time_pass_reference: on php_allow_call_time_pass_reference: 'on'
php_browscap: false php_browscap: no
php_date_timezone: Europe/Berlin php_date_timezone: Europe/Berlin
php_display_errors: Off php_display_errors: 'Off'
php_display_startup_errors: Off php_display_startup_errors: 'Off'
php_error_reporting: E_ALL & ~E_NOTICE php_error_reporting: E_ALL & ~E_NOTICE
php_expose_php: Off php_expose_php: 'Off'
php_filter_default: unsafe_raw php_filter_default: unsafe_raw
php_html_errors: Off php_html_errors: 'Off'
php_log_errors: On php_log_errors: 'On'
php_magic_quotes_gpc: On php_magic_quotes_gpc: 'On'
php_max_execution_time: 30 php_max_execution_time: 30
php_max_file_uploads: 20 php_max_file_uploads: 20
php_max_input_time: 60 php_max_input_time: 60
php_max_input_vars: 1000 php_max_input_vars: 1000
php_memory_limit: 32M php_memory_limit: 32M
php_needs_msodbc: false php_needs_msodbc: no
php_needs_oci8: false php_needs_oci8: no
php_output_buffering: 4096 php_output_buffering: 4096
php_post_max_size: 32M php_post_max_size: 32M
php_register_globals: Off php_register_globals: 'Off'
php_register_long_arrays: On php_register_long_arrays: 'On'
php_sendmail_path: /usr/sbin/sendmail -t -i php_sendmail_path: /usr/sbin/sendmail -t -i
php_session_cache_expire: 180 php_session_cache_expire: 180
php_session_cookie_lifetime: 0 php_session_cookie_lifetime: 0
php_session_gc_divisor: 1000 php_session_gc_divisor: 1000
php_session_gc_maxlifetime: 1440 php_session_gc_maxlifetime: 1440
php_short_open_tag: Off php_short_open_tag: 'Off'
php_upload_max_filesize: 2M php_upload_max_filesize: 2M
php_zend_assertions: -1 php_zend_assertions: -1
...@@ -105,13 +107,13 @@ php53: ...@@ -105,13 +107,13 @@ php53:
- gd - gd
- imagick - imagick
- imap - imap
#- json # - json
- mcrypt - mcrypt
#- memcached # - memcached
- mysql - mysql
- mysqli - mysqli
- pdo_mysql - pdo_mysql
#- readline # - readline
- redis - redis
- xmlrpc - xmlrpc
extdir: /usr/local/lib/php/extensions/no-debug-non-zts-20090626 extdir: /usr/local/lib/php/extensions/no-debug-non-zts-20090626
......
...@@ -13,26 +13,26 @@ ...@@ -13,26 +13,26 @@
- block: - block:
- include_tasks: variables.yml - include_tasks: variables.yml
tags: tags:
- always - always
- import_tasks: php.yml - import_tasks: php.yml
- name: Link PhpEnMod for PHP 5.3 - name: Link PhpEnMod for PHP 5.3
file: file:
dest: /usr/local/bin/php{{ item }} dest: /usr/local/bin/php{{ item }}
src: /usr/sbin/php5{{ item }} src: /usr/sbin/php5{{ item }}
state: link state: link
with_items: with_items:
- enmod - enmod
- dismod - dismod
when: php_version|default("5.5") == "5.3" when: php_version|default("5.5") == "5.3"
- name: PHP | Remember that this role had been run - name: PHP | Remember that this role had been run
set_fact: set_fact:
role_php_completed: yes role_php_completed: yes
tags: tags:
- always - always
when: not excluded_roles or "php" not in excluded_roles and role_php_completed is not defined when: not excluded_roles or "php" not in excluded_roles and role_php_completed is not defined
...@@ -12,80 +12,80 @@ ...@@ -12,80 +12,80 @@
- block: - block:
- name: PHP | OCI | Enable OCI for PHP - name: PHP | OCI | Enable OCI for PHP
copy: copy:
content: extension={{ item }}.so content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
with_items: with_items:
- oci8 - oci8
- pdo_oci - pdo_oci
- name: PHP | OCI | Remove possible components in /tmp - name: PHP | OCI | Remove possible components in /tmp
file: file:
path: /tmp/{{ item }} path: /tmp/{{ item }}
state: absent state: absent
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so - oracle_x64_11_2_0_3_0_oci8_so
- oracle_x64_11_2_0_3_0_pdo_oci_so - oracle_x64_11_2_0_3_0_pdo_oci_so
- name: PHP | OCI | Make available Oracle InstantClient - name: PHP | OCI | Make available Oracle InstantClient
command: scp -r {{ repository }}{{ item }} /tmp/ command: scp -r {{ repository }}{{ item }} /tmp/
become: no become: no
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so - oracle_x64_11_2_0_3_0_oci8_so
- oracle_x64_11_2_0_3_0_pdo_oci_so - oracle_x64_11_2_0_3_0_pdo_oci_so
- name: PHP | OCI | Remove /usr/local/lib/instantclient_11_2 - name: PHP | OCI | Remove /usr/local/lib/instantclient_11_2
file: file:
path: /usr/local/lib/instantclient_11_2 path: /usr/local/lib/instantclient_11_2
state: absent state: absent
- name: PHP | OCI | Move Oracle InstantClient to /usr/local/lib - name: PHP | OCI | Move Oracle InstantClient to /usr/local/lib
command: mv /tmp/instantclient_11_2 /usr/local/lib/ command: mv /tmp/instantclient_11_2 /usr/local/lib/
- name: PHP | OCI | Move oci8 to /usr/lib/php5 - 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 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 - 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 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 - name: PHP | OCI | Change ownership for Oracle InstantClient
file: file:
path: '{{ item }}' path: '{{ item }}'
owner: root owner: root
group: root group: root
recurse: yes recurse: yes
follow: no follow: no
with_items: with_items:
- /usr/local/lib/instantclient_11_2 - /usr/local/lib/instantclient_11_2
- name: Ensure log directories - name: Ensure log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log/diag/clients path: /usr/local/lib/instantclient_11_2/log/diag/clients
owner: www-data owner: www-data
group: root group: root
state: directory state: directory
mode: 0775 mode: 0775
follow: no follow: no
- name: Set permissions in log directories - name: Set permissions in log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log path: /usr/local/lib/instantclient_11_2/log
owner: www-data owner: www-data
group: root group: root
mode: 0775 mode: 0775
recurse: yes recurse: yes
follow: no follow: no
- name: PHP | OCI | Make available libclntsh.so - name: PHP | OCI | Make available libclntsh.so
file: file:
src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1 src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1
dest: /usr/local/lib/instantclient_11_2/libclntsh.so dest: /usr/local/lib/instantclient_11_2/libclntsh.so
state: link state: link
when: not oci_file.stat.exists when: not oci_file.stat.exists
...@@ -8,74 +8,74 @@ ...@@ -8,74 +8,74 @@
- block: - block:
- name: Enable OCI for PHP - name: Enable OCI for PHP
copy: copy:
content: extension={{ item }}.so content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
with_items: with_items:
- oci8 - oci8
- name: Remove possible components in /tmp - name: Remove possible components in /tmp
file: file:
path: /tmp/{{ item }} path: /tmp/{{ item }}
state: absent state: absent
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so_php_5_6 - oracle_x64_11_2_0_3_0_oci8_so_php_5_6
- name: Make available Oracle InstantClient - name: Make available Oracle InstantClient
command: scp -r {{ repository }}{{ item }} /tmp/ command: scp -r {{ repository }}{{ item }} /tmp/
become: no become: no
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so_php_5_6 - oracle_x64_11_2_0_3_0_oci8_so_php_5_6
- name: Remove /usr/local/lib/instantclient_11_2 - name: Remove /usr/local/lib/instantclient_11_2
file: file:
path: /usr/local/lib/instantclient_11_2 path: /usr/local/lib/instantclient_11_2
state: absent state: absent
- name: Move Oracle InstantClient to /usr/local/lib - name: Move Oracle InstantClient to /usr/local/lib
command: mv /tmp/instantclient_11_2 /usr/local/lib/ command: mv /tmp/instantclient_11_2 /usr/local/lib/
- name: Move oci8 to /usr/lib/php - name: Move oci8 to /usr/lib/php
command: mv /tmp/oracle_x64_11_2_0_3_0_oci8_so_php_4_5 /usr/lib/php/20131226/oci8.so command: mv /tmp/oracle_x64_11_2_0_3_0_oci8_so_php_4_5 /usr/lib/php/20131226/oci8.so
- name: Change ownership for Oracle InstantClient - name: Change ownership for Oracle InstantClient
file: file:
path: '{{ item }}' path: '{{ item }}'
owner: root owner: root
group: root group: root
recurse: yes recurse: yes
follow: no follow: no
with_items: with_items:
- /usr/local/lib/instantclient_11_2 - /usr/local/lib/instantclient_11_2
- name: Ensure log directories - name: Ensure log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log/diag/clients path: /usr/local/lib/instantclient_11_2/log/diag/clients
owner: www-data owner: www-data
group: root group: root
state: directory state: directory
mode: 0775 mode: 0775
follow: no follow: no
- name: Set permissions in log directories - name: Set permissions in log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log path: /usr/local/lib/instantclient_11_2/log
owner: www-data owner: www-data
group: root group: root
mode: 0775 mode: 0775
recurse: yes recurse: yes
follow: no follow: no
- name: Make available libclntsh.so - name: Make available libclntsh.so
file: file:
src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1 src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1
dest: /usr/local/lib/instantclient_11_2/libclntsh.so dest: /usr/local/lib/instantclient_11_2/libclntsh.so
state: link state: link
when: not oci_file.stat.exists when: not oci_file.stat.exists
...@@ -8,74 +8,74 @@ ...@@ -8,74 +8,74 @@
- block: - block:
- name: Enable OCI for PHP - name: Enable OCI for PHP
copy: copy:
content: extension={{ item }}.so content: extension={{ item }}.so
dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini dest: /etc/{{ php_base_dir }}/{{ php_conf_dir }}/{{ item }}.ini
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
with_items: with_items:
- oci8 - oci8
- name: Remove possible components in /tmp - name: Remove possible components in /tmp
file: file:
path: /tmp/{{ item }} path: /tmp/{{ item }}
state: absent state: absent
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so_php_7 - oracle_x64_11_2_0_3_0_oci8_so_php_7
- name: Make available Oracle InstantClient - name: Make available Oracle InstantClient
command: scp -r {{ repository }}{{ item }} /tmp/ command: scp -r {{ repository }}{{ item }} /tmp/
become: no become: no
with_items: with_items:
- instantclient_11_2 - instantclient_11_2
- oracle_x64_11_2_0_3_0_oci8_so_php_7 - oracle_x64_11_2_0_3_0_oci8_so_php_7
- name: Remove /usr/local/lib/instantclient_11_2 - name: Remove /usr/local/lib/instantclient_11_2
file: file:
path: /usr/local/lib/instantclient_11_2 path: /usr/local/lib/instantclient_11_2
state: absent state: absent
- name: Move Oracle InstantClient to /usr/local/lib - name: Move Oracle InstantClient to /usr/local/lib
command: mv /tmp/instantclient_11_2 /usr/local/lib/ command: mv /tmp/instantclient_11_2 /usr/local/lib/
- name: Move oci8 to /usr/lib/php - name: Move oci8 to /usr/lib/php
command: mv /tmp/oracle_x64_11_2_0_3_0_oci8_so_php_7 /usr/lib/php/20151012/oci8.so command: mv /tmp/oracle_x64_11_2_0_3_0_oci8_so_php_7 /usr/lib/php/20151012/oci8.so
- name: Change ownership for Oracle InstantClient - name: Change ownership for Oracle InstantClient
file: file:
path: '{{ item }}' path: '{{ item }}'
owner: root owner: root
group: root group: root
recurse: yes recurse: yes
follow: no follow: no
with_items: with_items:
- /usr/local/lib/instantclient_11_2 - /usr/local/lib/instantclient_11_2
- name: Ensure log directories - name: Ensure log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log/diag/clients path: /usr/local/lib/instantclient_11_2/log/diag/clients
owner: www-data owner: www-data
group: root group: root
state: directory state: directory
mode: 0775 mode: 0775
follow: no follow: no
- name: Set permissions in log directories - name: Set permissions in log directories
file: file:
path: /usr/local/lib/instantclient_11_2/log path: /usr/local/lib/instantclient_11_2/log
owner: www-data owner: www-data
group: root group: root
mode: 0775 mode: 0775
recurse: yes recurse: yes
follow: no follow: no
- name: Make available libclntsh.so - name: Make available libclntsh.so
file: file:
src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1 src: /usr/local/lib/instantclient_11_2/libclntsh.so.11.1
dest: /usr/local/lib/instantclient_11_2/libclntsh.so dest: /usr/local/lib/instantclient_11_2/libclntsh.so
state: link state: link
when: not oci_file.stat.exists when: not oci_file.stat.exists
...@@ -16,99 +16,99 @@ ...@@ -16,99 +16,99 @@
changed_when: no changed_when: no
- block: - block:
- name: Package Preferences - name: Package Preferences
template: template:
src: preferences/{{ item }} src: preferences/{{ item }}
dest: /etc/apt/preferences.d/{{ item }}-pin dest: /etc/apt/preferences.d/{{ item }}-pin
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
with_items: with_items:
- openssl - openssl
- libssl - libssl
- name: Install Packages - name: Install Packages
apt: apt:
pkg: '{{ packages }}' pkg: '{{ packages }}'
state: present state: present
vars: vars:
packages: packages:
- autoconf2.13 - autoconf2.13
- automake1.4 - automake1.4
- build-essential - build-essential
- libc-client2007e - libc-client2007e
- libc-client2007e-dev - libc-client2007e-dev
- libfcgi-dev - libfcgi-dev
- libfcgi0ldbl - libfcgi0ldbl
- libfreetype6-dev - libfreetype6-dev
- libgif-dev - libgif-dev
- libgif4 - libgif4
- libjpeg-progs - libjpeg-progs
- libjpeg62-dbg - libjpeg62-dbg
- libjpeg8 - libjpeg8
- libjpeg8-dev - libjpeg8-dev
- libmcrypt-dev - libmcrypt-dev
- libmysqlclient-dev - libmysqlclient-dev
- libpcre++-dev - libpcre++-dev
- libpcre3-dev - libpcre3-dev
- libpng-dev - libpng-dev
- libssl-dev - libssl-dev
- libx11-dev - libx11-dev
- libxau-dev - libxau-dev
- libxcb1-dev - libxcb1-dev
- libxdmcp-dev - libxdmcp-dev
- libxml2-dev - libxml2-dev
- libxml2-dev - libxml2-dev
- libxpm-dev - libxpm-dev
- x11proto-core-dev - x11proto-core-dev
- x11proto-input-dev - x11proto-input-dev
- x11proto-kb-dev - x11proto-kb-dev
- xtrans-dev - xtrans-dev
- name: Link Client Lib - name: Link Client Lib
file: file:
src: /usr/lib/libc-client.a src: /usr/lib/libc-client.a
dest: /usr/lib/x86_64-linux-gnu/libc-client.a dest: /usr/lib/x86_64-linux-gnu/libc-client.a
state: link state: link
- name: Make sure an empty directory /tmp/php53 exists - name: Make sure an empty directory /tmp/php53 exists
file: file:
path: /tmp/php53 path: /tmp/php53
state: '{{ item }}' state: '{{ item }}'
with_items: with_items:
- absent - absent
- directory - directory
- name: Download PHP 5.3 - name: Download PHP 5.3
get_url: get_url:
url: http://in1.php.net/distributions/php-5.3.29.tar.bz2 url: http://in1.php.net/distributions/php-5.3.29.tar.bz2
dest: /tmp/php-5.3.29.tar.bz2 dest: /tmp/php-5.3.29.tar.bz2
- name: Unpack PHP 5.3 - name: Unpack PHP 5.3
unarchive: unarchive:
src: /tmp/php-5.3.29.tar.bz2 src: /tmp/php-5.3.29.tar.bz2
dest: /tmp/php53 dest: /tmp/php53
copy: no copy: no
- name: Compile PHP 5.3 - name: Compile PHP 5.3
shell: '{{ item }}' shell: '{{ item }}'
args: args:
chdir: /tmp/php53/php-5.3.29 chdir: /tmp/php53/php-5.3.29
with_items: with_items:
- ./configure --with-libdir=/lib/x86_64-linux-gnu --enable-fpm --enable-mbstring --enable-sockets --with-zlib --enable-zip --with-imap-ssl --with-imap --with-curl --with-mcrypt --with-gd --with-mysql --with-pdo-mysql --with-mysqli --with-gettext --with-jpeg-dir=/usr --with-png-dir=/usr --with-kerberos --with-openssl --disable-cgi - ./configure --with-libdir=/lib/x86_64-linux-gnu --enable-fpm --enable-mbstring --enable-sockets --with-zlib --enable-zip --with-imap-ssl --with-imap --with-curl --with-mcrypt --with-gd --with-mysql --with-pdo-mysql --with-mysqli --with-gettext --with-jpeg-dir=/usr --with-png-dir=/usr --with-kerberos --with-openssl --disable-cgi
- make - make
- make install - make install
- name: Create PHP53 Start Script - name: Create PHP53 Start Script
template: template:
src: etc-init-d-php53-fpm src: etc-init-d-php53-fpm
dest: /etc/init.d/php-fpm dest: /etc/init.d/php-fpm
owner: root owner: root
group: root group: root
mode: 0755 mode: 0755
- name: Add PHP-FPM to Boot-List - name: Add PHP-FPM to Boot-List
command: update-rc.d php-fpm defaults command: update-rc.d php-fpm defaults
when: php_version_available and 'PHP 5.3.29' not in php_version_available.stdout when: php_version_available and 'PHP 5.3.29' not in php_version_available.stdout
......
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