Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Resolve ansible deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mjmeijerman authored Jun 11, 2019
1 parent 29e4f3e commit 5bd82a0
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
- name: Install PHP module development files
apt:
name: "php{{ php7_version }}-dev"
when: php7_enable_dev
when: php7_enable_dev | bool

- name: Install PHP Apache2 module
apt:
name: "libapache2-mod-php{{ php7_version }}"
when: php7_enable_apache
when: php7_enable_apache | bool

- name: Configure PHP for Apache2
template:
Expand All @@ -48,25 +48,25 @@
vars:
php7_ini_directives: "{{ php7_ini_directives_default | combine(php7_ini_directives_global) | combine(php7_ini_directives_apache) }}"
notify: Restart Apache
when: php7_enable_apache
when: php7_enable_apache | bool

- name: Install PHP CGI binary
apt:
name: "php{{ php7_version }}-cgi"
when: php7_enable_cgi
when: php7_enable_cgi | bool

- name: Configure PHP for CGI
template:
src: php.ini.j2
dest: "/etc/php/{{ php7_version }}/cgi/conf.d/99-customization.ini"
vars:
php7_ini_directives: "{{ php7_ini_directives_default | combine(php7_ini_directives_global) | combine(php7_ini_directives_cgi) }}"
when: php7_enable_cgi
when: php7_enable_cgi | bool

- name: Install PHP FPM binary
apt:
name: "php{{ php7_version }}-fpm"
when: php7_enable_fpm
when: php7_enable_fpm | bool

- name: Configure PHP for FPM
template:
Expand All @@ -75,40 +75,40 @@
vars:
php7_ini_directives: "{{ php7_ini_directives_default | combine(php7_ini_directives_global) | combine(php7_ini_directives_fpm) }}"
notify: Restart PHP FPM
when: php7_enable_fpm
when: php7_enable_fpm | bool

- name: Configure FPM
template:
src: php-fpm.conf.j2
dest: "/etc/php/{{ php7_version }}/fpm/php-fpm.conf"
notify: Restart PHP FPM
when: php7_enable_fpm
when: php7_enable_fpm | bool

- name: Ensure "chdir" in the standard pool exists
file:
path: "{{ php7_fpm_pool_chdir }}"
state: directory
when: php7_enable_fpm and php7_fpm_pool_enabled
when: php7_enable_fpm | bool and php7_fpm_pool_enabled | bool

- name: Configure the standard pool for FPM
template:
src: php-fpm-pool.conf.j2
dest: "/etc/php/{{ php7_version }}/fpm/pool.d/{{ php7_fpm_pool_name }}.conf"
notify: Restart PHP FPM
when: php7_enable_fpm and php7_fpm_pool_enabled
when: php7_enable_fpm | bool and php7_fpm_pool_enabled | bool

- name: Remove the standard pool for FPM
file:
path: "/etc/php/{{ php7_version }}/fpm/pool.d/{{ php7_fpm_pool_name }}.conf"
state: absent
notify: Restart PHP FPM
when: php7_enable_fpm and not php7_fpm_pool_enabled
when: php7_enable_fpm | bool and not php7_fpm_pool_enabled | bool

- name: Enable the FPM service
service:
name: "php{{ php7_version }}-fpm"
enabled: yes
when: php7_enable_fpm
when: php7_enable_fpm | bool

- name: Install PHP extensions
apt:
Expand Down

0 comments on commit 5bd82a0

Please sign in to comment.