Fix lint errors

new_release
Emilien Mantel 2021-08-31 10:51:29 +02:00
parent 99f4da524b
commit 387b03ddbf
7 changed files with 102 additions and 79 deletions

8
.ansible-lint 100644
View File

@ -0,0 +1,8 @@
---
# TODO: enable later
# enable_list:
# - fqcn-builtins
skip_list:
- role-name

View File

@ -1,7 +1,7 @@
Ansible PHP (+FPM) role for Debian / Ubuntu / FreeBSD
=====================================================
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.php-blue.svg)](https://galaxy.ansible.com/HanXHX/php) [![Build Status](https://travis-ci.org/HanXHX/ansible-php.svg?branch=master)](https://travis-ci.org/HanXHX/ansible-php)
[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.php-blue.svg)](https://galaxy.ansible.com/HanXHX/php) [![Build Status](https://app.travis-ci.com/HanXHX/ansible-php.svg?branch=master)](https://app.travis-ci.com/HanXHX/ansible-php)
Install PHP on Debian / Ubuntu / FreeBSD. Manage PHP-FPM, APCu, Opcache and Xdebug.

View File

@ -24,10 +24,10 @@ galaxy_info:
- development
- web
- php
- php-fpm
- fpm
- php7
- php8
- debian
- ubuntu
- freebsd
dependencies: []

View File

@ -17,7 +17,10 @@
dest: '{{ php_fpm_ini }}'
regexp: '^;?{{ item.key }}'
line: '{{ item.key }} = {{ item.value }}'
create: yes
create: true
owner: root
group: root
mode: 0644
loop: "{{ php_ini | combine(php_ini_fpm) | dict2items }}"
notify: restart php-fpm
@ -25,6 +28,9 @@
template:
src: etc/__php__/fpm/pool.d/pool.conf.j2
dest: '{{ php_fpm_pool_dir }}/{{ item.name }}.conf'
owner: root
group: root
mode: 0644
loop: "{{ ansible_local.hanxhx_php.fpm_pool }}"
notify: restart php-fpm

View File

@ -39,12 +39,15 @@
file:
path: /etc/ansible/facts.d
state: directory
recurse: yes
recurse: true
- name: COPY | Manage facts
copy:
content: "{ \"fpm_pool\": {{ php_fpm_full_pool | to_nice_json }} }"
dest: /etc/ansible/facts.d/hanxhx_php.fact
owner: root
group: root
mode: 0644
register: f
- name: SETUP | Gathers new facts
@ -57,7 +60,7 @@
apt:
pkg: "{{ pkgs }}"
state: present
update_cache: yes
update_cache: true
cache_valid_time: 3600
vars:
pkgs: "{{ php_packages + php_extra_packages | flatten }}"

View File

@ -28,10 +28,16 @@
template:
src: "etc/__php__/mods-available/opcache.ini.j2"
dest: "{{ php_mods_dir }}/opcache.ini"
owner: root
group: root
mode: 0644
notify: restart php-fpm
- name: TEMPLATE | Configure APCu
template:
src: "etc/__php__/mods-available/apcu.ini.j2"
dest: "{{ php_mods_dir }}/apcu.ini"
owner: root
group: root
mode: 0644
notify: restart php-fpm

View File

@ -6,7 +6,7 @@
apt:
pkg: "{{ php_xdebug_package }}"
state: present
update_cache: yes
update_cache: true
cache_valid_time: 3600
when: ansible_os_family == 'Debian'