<commit_before>---

# file: playbooks/roles/web/tasks/php.yml

#
# PPA migration: https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php
#

- name: remove osbolete 5.6 PPA (Ubuntu)
  file: name=/etc/apt/sources.list.d/{{ item }} state=absent
  with_items:
    - "ppa_ondrej_php5_5_6_trusty.list"
  when: ansible_distribution == "Ubuntu"
  tags: [ php, update ]

- name: PHP PPA (Ubuntu)
  apt_repository: repo='ppa:ondrej/php' update_cache=yes
  when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "12.04"
  ignore_errors: yes
  tags: [ php, update ]

#
# TODO: Add Debian PPA, https://packages.sury.org/php/
#

- name: be sure web packages packages are installed (Debian family)
  apt: pkg={{ item }} state=latest force=yes
  with_items:
    - apache2
    - libapache2-mod-php5.6
    - libapache2-mod-rpaf
    - apachetop
    - php5.6
    - php5.6-cli
    - php5.6-gd
    - php5.6-json
    - php5.6-mysql
    - php5.6-tidy
    - php5.6-curl
    - php5.6-gd
    - php5.6-imagick
    - php5.6-imap
    - php5.6-intl
    - php5.6-ldap
    - php5.6-mcrypt
    - php5.6-gettext
    - php5.6-xml
    - php5.6-mbstring
    - php5.6-soap
    - php5-common
    - php-memcache
    - php-db
    - php-mdb2
    - php-pear
    - imagemagick
    - gifsicle
    - optipng
    - libjpeg-progs
    # - varnish
    - memcached
  when: ansible_os_family == "Debian"
  ignore_errors: yes
  tags: [ php, apache2 ]

- name: be sure web packages packages are installed (FreeBSD)
  pkgng: name={{item}} state=present
  with_items:
    - php6-5.6.1
    - php6-json-5.6.1
    - php6-phar-5.6.1
    - php6-filter-5.6.1
    - php6-hash-5.6.1
    - php6-ctype-5.6.1
    - php6-openssl-5.6.1<commit_msg>Prefer php-memcached over php-memcache, as @ocean90 comments: For some yet unknown reasons running WP with memcached is slower than without. That's unexpected.<commit_after>---

# file: playbooks/roles/web/tasks/php.yml

#
# PPA migration: https://github.com/oerdnj/deb.sury.org/wiki/PPA-migration-to-ppa:ondrej-php
#

- name: remove osbolete 5.6 PPA (Ubuntu)
  file: name=/etc/apt/sources.list.d/{{ item }} state=absent
  with_items:
    - "ppa_ondrej_php5_5_6_trusty.list"
  when: ansible_distribution == "Ubuntu"
  tags: [ php, update ]

- name: PHP PPA (Ubuntu)
  apt_repository: repo='ppa:ondrej/php' update_cache=yes
  when: ansible_distribution == "Ubuntu" and ansible_distribution_version != "12.04"
  ignore_errors: yes
  tags: [ php, update ]

#
# TODO: Add Debian PPA, https://packages.sury.org/php/
#

- name: be sure web packages packages are installed (Debian family)
  apt: pkg={{ item }} state=latest force=yes
  with_items:
    - apache2
    - libapache2-mod-php5.6
    - libapache2-mod-rpaf
    - apachetop
    - php5.6
    - php5.6-cli
    - php5.6-gd
    - php5.6-json
    - php5.6-mysql
    - php5.6-tidy
    - php5.6-curl
    - php5.6-gd
    - php5.6-imagick
    - php5.6-imap
    - php5.6-intl
    - php5.6-ldap
    - php5.6-mcrypt
    - php5.6-gettext
    - php5.6-xml
    - php5.6-mbstring
    - php5.6-soap
    - php5-common
    - php-memcached
    - php-db
    - php-mdb2
    - php-pear
    - imagemagick
    - gifsicle
    - optipng
    - libjpeg-progs
    # - varnish
    - memcached
  when: ansible_os_family == "Debian"
  ignore_errors: yes
  tags: [ php, apache2 ]

- name: be sure web packages packages are installed (FreeBSD)
  pkgng: name={{item}} state=present
  with_items:
    - php6-5.6.1
    - php6-json-5.6.1
    - php6-phar-5.6.1
    - php6-filter-5.6.1
    - php6-hash-5.6.1
    - php6-ctype-5.6.1
    - php6-openssl-5.6.1
{'fraction_non_alphanumeric': 0.1406642478370081, 'fraction_numerical': 0.044655316773653364, 'mean_word_length': 2.27007299270073, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1764769', 'n_tokens_mistral': 1623, 'n_tokens_neox': 1480, 'n_words': 266}