Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
4cfdab95ec | |||
22dd6dd8cd | |||
3b682bee44 | |||
93a231147e | |||
1f272190fb | |||
a51e3ece2d |
13 changed files with 59 additions and 21 deletions
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
driver:
|
||||
name: docker_cli
|
||||
|
||||
|
@ -16,7 +17,7 @@ provisioner:
|
|||
platforms:
|
||||
- name: debian-9
|
||||
driver_config:
|
||||
image: nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.6' %>
|
||||
image: "nishiki/debian9:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.7' %>"
|
||||
command: /bin/systemd
|
||||
volume:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
---
|
||||
AllCops:
|
||||
Exclude:
|
||||
- db/**/*
|
||||
|
|
|
@ -1,21 +1,28 @@
|
|||
---
|
||||
sudo: required
|
||||
language: ruby
|
||||
|
||||
env:
|
||||
- ANSIBLE_VERSION=2.4
|
||||
- ANSIBLE_VERSION=2.5
|
||||
- ANSIBLE_VERSION=2.6
|
||||
- ANSIBLE_VERSION=2.7
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_install:
|
||||
- bundle install
|
||||
- sudo pip install --upgrade pip
|
||||
- sudo pip install yamllint
|
||||
- sudo pip install ansible-lint
|
||||
- git clone https://github.com/ansible/galaxy-lint-rules.git
|
||||
|
||||
script:
|
||||
- kitchen conv phpfpm-debian-9
|
||||
- kitchen conv phpfpm-debian-9 | grep changed=0
|
||||
- kitchen verify phpfpm-debian-9
|
||||
- ansible-lint -r galaxy-lint-rules/rules .
|
||||
- yamllint .
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
|
|
12
.yamllint
Normal file
12
.yamllint
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
extends: default
|
||||
|
||||
ignore: |
|
||||
.kitchen/*
|
||||
vendor/
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 120
|
||||
level: warning
|
||||
truthy: false
|
26
CHANGELOG.md
26
CHANGELOG.md
|
@ -1,13 +1,21 @@
|
|||
# CHANGELOG
|
||||
## v1.1.0 (2018-09-30)
|
||||
### Changed
|
||||
* remove set attributes on homes directories
|
||||
* remove phpfpm_group var
|
||||
* replace include_tasks to import_tasks
|
||||
|
||||
### Fixed
|
||||
* group permission in pools template
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## v1.2.0 (2018-12-01)
|
||||
- BREAKING CHANGE: change with_items to loop
|
||||
- test: add test with ansible 2.7
|
||||
- test: add ansible-lint
|
||||
- test: add yamllint
|
||||
|
||||
## v1.1.0 (2018-09-30)
|
||||
- feat: set attributes on homes directories
|
||||
- feat: remove phpfpm_group var
|
||||
- style: replace include_tasks to import_tasks
|
||||
- fix: group permission in pools template
|
||||
|
||||
## v1.0.0 (2018-08-15)
|
||||
|
||||
* first version
|
||||
- first version
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Ansible role: PHP FPM
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.1.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-phpfpm/releases)
|
||||
[![Version](https://img.shields.io/badge/latest_version-1.2.0-green.svg)](https://git.yaegashi.fr/nishiki/ansible-role-phpfpm/releases)
|
||||
[![Build Status](https://travis-ci.org/nishiki/ansible-role-phpfpm.svg?branch=master)](https://travis-ci.org/nishiki/ansible-role-phpfpm)
|
||||
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](https://git.yaegashi.fr/nishiki/ansible-role-phpfpm/src/branch/master/LICENSE)
|
||||
|
||||
|
@ -7,7 +7,7 @@ Install and configure PHP FPM
|
|||
|
||||
## Requirements
|
||||
|
||||
* Ansible >= 2.4
|
||||
* Ansible >= 2.5
|
||||
* Debian Stretch
|
||||
|
||||
## Role variables
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
phpfpm_version: 7.0
|
||||
phpfpm_dir: /etc/php/{{ phpfpm_version }}/fpm
|
||||
phpfpm_dir_log: /var/log/phpfpm
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: reload php-fpm
|
||||
systemd:
|
||||
name: 'php{{ phpfpm_version }}-fpm'
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
---
|
||||
galaxy_info:
|
||||
role_name: phpfpm
|
||||
author: Adrien Waksberg
|
||||
company: Adrien Waksberg
|
||||
description: Install and configure PHP-FPM
|
||||
license: Apache2
|
||||
min_ansible_version: 2.4
|
||||
min_ansible_version: 2.5
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- name: install php-fpm package
|
||||
package:
|
||||
name: 'php{{ phpfpm_version }}-fpm'
|
||||
|
@ -5,8 +6,7 @@
|
|||
|
||||
- name: install additionnal packages
|
||||
package:
|
||||
name: '{{ item }}'
|
||||
with_items: '{{ phpfpm_packages }}'
|
||||
name: '{{ phpfpm_packages }}'
|
||||
tags: phpfpm
|
||||
|
||||
- name: create log directory
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- import_tasks: base.yml
|
||||
tags: phpfpm
|
||||
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
---
|
||||
- name: check if pools log files exist
|
||||
stat:
|
||||
path: '{{ phpfpm_dir_log }}/{{ item[0].name }}.{{ item[1] }}'
|
||||
with_nested:
|
||||
- '{{ phpfpm_pools }}'
|
||||
- ['slow.log', 'access.log', 'log']
|
||||
loop: '{{ phpfpm_pools|product(log_files)|list }}'
|
||||
vars:
|
||||
log_files:
|
||||
- slow.log
|
||||
- access.log
|
||||
- log
|
||||
register: st
|
||||
tags: phpfpm
|
||||
|
||||
|
@ -14,7 +18,7 @@
|
|||
group: www-data
|
||||
mode: 0640
|
||||
state: touch
|
||||
with_items: '{{ st.results }}'
|
||||
loop: '{{ st.results }}'
|
||||
when: not item.stat.exists
|
||||
tags: phpfpm
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
connection: local
|
||||
vars:
|
||||
|
|
Loading…
Reference in a new issue