mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-30 13:03:26 +01:00
Formatting.
This commit is contained in:
parent
ad41a4565f
commit
8be0e8f6b6
@ -1,8 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: restart webserver
|
- name: restart webserver
|
||||||
service: "name={{ php_webserver_daemon }} state=restarted"
|
service:
|
||||||
|
name: "{{ php_webserver_daemon }}"
|
||||||
|
state: restarted
|
||||||
when: php_enable_webserver
|
when: php_enable_webserver
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
service: "name=php-fpm state=restarted"
|
service:
|
||||||
|
name: php-fpm
|
||||||
|
state: restarted
|
||||||
when: php_enable_php_fpm
|
when: php_enable_php_fpm
|
||||||
|
@ -3,47 +3,57 @@
|
|||||||
include_vars: "{{ ansible_os_family }}.yml"
|
include_vars: "{{ ansible_os_family }}.yml"
|
||||||
|
|
||||||
- name: Define php_packages.
|
- name: Define php_packages.
|
||||||
set_fact: php_packages="{{ __php_packages | list }}"
|
set_fact:
|
||||||
|
php_packages: "{{ __php_packages | list }}"
|
||||||
when: php_packages is not defined
|
when: php_packages is not defined
|
||||||
|
|
||||||
- name: Ensure PHP packages are installed (RedHat).
|
- name: Ensure PHP packages are installed (RedHat).
|
||||||
yum: >
|
yum:
|
||||||
name={{ item }}
|
name: "{{ item }}"
|
||||||
state=installed
|
state: installed
|
||||||
enablerepo={{ php_enablerepo }}
|
enablerepo: "{{ php_enablerepo }}"
|
||||||
with_items: php_packages
|
with_items: php_packages
|
||||||
notify: restart webserver
|
notify: restart webserver
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
- name: Ensure PHP packages are installed (Debian).
|
- name: Ensure PHP packages are installed (Debian).
|
||||||
apt: >
|
apt:
|
||||||
name={{ item }}
|
name: "{{ item }}"
|
||||||
state=installed
|
state: installed
|
||||||
with_items: php_packages
|
with_items: php_packages
|
||||||
notify: restart webserver
|
notify: restart webserver
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Assures {{ php_conf_path }} directory exists
|
- name: Ensure configuration directories exist.
|
||||||
file: path={{ php_conf_path }} state=directory
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
with_items:
|
||||||
|
- "{{ php_conf_path }}"
|
||||||
|
- "{{ php_extension_conf_path }}"
|
||||||
|
|
||||||
- name: Place PHP configuration file in place.
|
- name: Place PHP configuration file in place.
|
||||||
template: >
|
template:
|
||||||
src=php.ini.j2
|
src: php.ini.j2
|
||||||
dest={{ php_conf_path }}/php.ini
|
dest: "{{ php_conf_path }}/php.ini"
|
||||||
owner=root group=root mode=644
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
notify: restart webserver
|
notify: restart webserver
|
||||||
|
|
||||||
- name: Assures {{ php_extension_conf_path }} directory exists
|
|
||||||
file: path={{ php_extension_conf_path }} state=directory
|
|
||||||
|
|
||||||
- name: Place APC configuration file in place.
|
- name: Place APC configuration file in place.
|
||||||
template: >
|
template:
|
||||||
src=apc.ini.j2
|
src: apc.ini.j2
|
||||||
dest={{ php_extension_conf_path }}/{{ php_apc_conf_filename }}
|
dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}"
|
||||||
owner=root group=root mode=644
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: php_enable_apc
|
when: php_enable_apc
|
||||||
notify: restart webserver
|
notify: restart webserver
|
||||||
|
|
||||||
- name: Ensure php-fpm is started and enabled at boot (if configured).
|
- name: Ensure php-fpm is started and enabled at boot (if configured).
|
||||||
service: name=php-fpm state=started enabled=yes
|
service:
|
||||||
|
name: php-fpm
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
when: php_enable_php_fpm
|
when: php_enable_php_fpm
|
||||||
|
Loading…
Reference in New Issue
Block a user