mirror of
https://github.com/HanXHX/ansible-php.git
synced 2026-02-28 09:42:09 +07:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2723adf574 | ||
|
|
4aeea704d5 | ||
|
|
4615168559 |
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
galaxy_info:
|
galaxy_info:
|
||||||
author: Emilien Mantel
|
author: Emilien Mantel
|
||||||
namespace: hanxhx
|
namespace: HanXHX
|
||||||
role_name: php
|
role_name: php
|
||||||
description: Install and configure PHP 7.x/8.x
|
description: Install and configure PHP 7.x/8.x
|
||||||
company: TripleStack
|
company: TripleStack
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "templates/nginx.conf.j2"
|
src: "templates/nginx.conf.j2"
|
||||||
dest: "{{ __nginx_conf }}"
|
dest: "{{ __nginx_conf }}"
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
notify: Reload nginx
|
notify: Reload nginx
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: COPY | Add phpinfo
|
- name: COPY | Add phpinfo
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
content: '<?php phpinfo();'
|
content: '<?php phpinfo();'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
|
|
||||||
- name: COPY | Add ini test file
|
- name: COPY | Add ini test file
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
content: '<?php echo ini_get("memory_limit") . "\n";'
|
content: '<?php echo ini_get("memory_limit") . "\n";'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
|
|
||||||
- name: SHELL | Check vhost
|
- name: SHELL | Check vhost
|
||||||
ansible.builtin.shell: "set -o pipefail && curl -v -H 'Host: {{ vhost }}' http://127.0.0.1/phpinfo.php 2> /dev/null | grep h1 | grep -o 'PHP Version {{ ansible_local.hanxhx_php.php_version }}' | sed -r 's/<//g'"
|
ansible.builtin.shell: "set -o pipefail && curl -v -H 'Host: {{ vhost }}' http://127.0.0.1/phpinfo.php 2> /dev/null | grep h1 | grep -o 'PHP Version {{ ansible_local.hanxhx_php.php_version }}' | sed -r 's/<//g'"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
create: true
|
create: true
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
loop: "{{ php_ini | combine(php_ini_fpm) | dict2items }}"
|
loop: "{{ php_ini | combine(php_ini_fpm) | dict2items }}"
|
||||||
notify: Restart php-fpm
|
notify: Restart php-fpm
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
dest: '{{ php_fpm_pool_dir }}/{{ item.name }}.conf'
|
dest: '{{ php_fpm_pool_dir }}/{{ item.name }}.conf'
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
loop: "{{ ansible_local.hanxhx_php.fpm_pool }}"
|
loop: "{{ ansible_local.hanxhx_php.fpm_pool }}"
|
||||||
notify: Restart php-fpm
|
notify: Restart php-fpm
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
state: directory
|
state: directory
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0755
|
mode: "0755"
|
||||||
|
|
||||||
- name: COPY | Manage facts
|
- name: COPY | Manage facts
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
dest: /etc/ansible/facts.d/hanxhx_php.fact
|
dest: /etc/ansible/facts.d/hanxhx_php.fact
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
register: f
|
register: f
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
dest: "{{ php_mods_dir }}/opcache.ini"
|
dest: "{{ php_mods_dir }}/opcache.ini"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
notify: Restart php-fpm
|
notify: Restart php-fpm
|
||||||
|
|
||||||
- name: TEMPLATE | Configure APCu
|
- name: TEMPLATE | Configure APCu
|
||||||
@@ -25,5 +25,5 @@
|
|||||||
dest: "{{ php_mods_dir }}/apcu.ini"
|
dest: "{{ php_mods_dir }}/apcu.ini"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
notify: Restart php-fpm
|
notify: Restart php-fpm
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
src: "etc/__php__/mods-available/xdebug.ini.j2"
|
src: "etc/__php__/mods-available/xdebug.ini.j2"
|
||||||
dest: "{{ php_mods_dir }}/xdebug.ini"
|
dest: "{{ php_mods_dir }}/xdebug.ini"
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
notify: Restart php-fpm
|
notify: Restart php-fpm
|
||||||
|
|
||||||
- name: APT | Uninstall xdebug
|
- name: APT | Uninstall xdebug
|
||||||
|
|||||||
Reference in New Issue
Block a user