robertdebock.php_fpm
Ansible Role: php_fpm
This role is designed to install and set up php_fpm on your system.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
This playbook example comes from molecule/default/converge.yml
and is tested whenever changes are made.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.php_fpm
Before running, prepare your machine using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.epel
- role: robertdebock.buildtools
- role: robertdebock.python_pip
- role: robertdebock.openssl
openssl_items:
- name: apache-httpd
common_name: "{{ ansible_fqdn }}"
- role: robertdebock.httpd
You can find a full explanation and example on using these roles.
Role Variables
Default values for the variables are in defaults/main.yml
:
---
# default values for php_fpm
# `php_fpm_listen` can be an address:port or a socket path. For example: "127.0.0.1:9000"
php_fpm_listen: "{{ php_fpm_pid_directory }}/www.sock"
# If using a socket for `php_fpm_listen`, you can specify user and group.
# Default settings are in `vars/main.yml`
php_fpm_listen_owner: "{{ php_fpm_owner }}"
php_fpm_listen_group: "{{ php_fpm_group }}"
php_fpm_listen_mode: "0666"
php_fpm_pm: dynamic
php_fpm_pm_max_children: 5
php_fpm_pm_start_servers: 2
php_fpm_pm_min_spare_servers: 1
php_fpm_pm_max_spare_servers: 3
Requirements
You need the pip packages listed in requirements.txt.
State of Used Roles
Several roles are used to prepare your system. You can choose a different preparation method if preferred.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap | ||
robertdebock.buildtools | ||
robertdebock.epel | ||
robertdebock.openssl | ||
robertdebock.python_pip | ||
robertdebock.selinux | ||
robertdebock.httpd |
Context
This role is one of many that work well together. Check out the documentation for these roles for more details.
Here's a visual representation of related roles:
Compatibility
This role has been tested on the following container images:
container | tags |
---|---|
EL | 9 |
Debian | all |
Fedora | all |
Ubuntu | all |
You need at least Ansible version 2.12. Tests were conducted on:
- The previous version.
- The current version.
- The development version.
If you encounter any issues, please report them on GitHub.
License
Author Information
If you'd like to support my work, consider sponsoring me.
The purpose of this role is to install and configure php_fpm on your system.
ansible-galaxy install robertdebock.php_fpm