buluma.ansible-role-apache-php-fpm
Ansible Role: Apache-PHP-FPM
This role sets up Apache 2.4+ with PHP-FPM for Linux.
GitHub | Version | Issues | Pull Requests |
---|---|---|---|
Example Playbook
This example comes from molecule/default/converge.yml
and is tested with every change.
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
vars:
apache_listen_port_ssl: 443
apache_create_vhosts: true
apache_vhosts_filename: "vhosts.conf"
apache_vhosts:
- servername: "example.com"
documentroot: "/var/www/vhosts/example_com"
roles:
- role: buluma.apache-php-fpm
Prepare the machine using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
gather_facts: no
become: yes
roles:
- role: buluma.bootstrap
- role: geerlingguy.repo_remi
when: ansible_os_family == 'RedHat'
- role: geerlingguy.apache
- role: geerlingguy.php-versions
- role: geerlingguy.php
- role: geerlingguy.apache-php-fpm
For more details, check the full guide on using these roles.
Role Variables
The default variables are set in defaults/main.yml
:
---
# Default settings for ansible-role-apache-php-fpm
Requirements
- Python packages from requirements.txt.
Used Roles
Several roles are used for system preparation. You can use different methods to prepare your system.
Requirement | GitHub | Version |
---|---|---|
buluma.bootstrap | ||
geerlingguy.repo_remi | ||
geerlingguy.apache | ||
geerlingguy.php-versions | ||
geerlingguy.php | ||
geerlingguy.apache-php-fpm |
Context
This role works well with many other compatible roles. Check out their documentation for more details.
Here’s a look at related roles:
Compatibility
This role has been tested with these container images:
Container | Tags |
---|---|
EL | all |
Debian | all |
Ubuntu | all |
You need at least Ansible version 2.1. It has been tested with:
- The previous version.
- The current version.
- The development version.
If you encounter issues, please report them on GitHub.
Changelog
For improvements and updates, check the Role History.
License
This project is licensed under the Apache-2.0 License.
Author Information
This role was created by Michael Buluma.
Special Thanks
Template design inspired by Robert de Bock.
ansible-galaxy install buluma.ansible-role-apache-php-fpm