mirror of
https://github.com/de-it-krachten/ansible-role-php
synced 2026-05-14 11:51:54 +00:00
No description
- Jinja 100%
|
|
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| handlers | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
php
Manages php
Dependencies
Roles
None
Collections
None
Platforms
Supported platforms
- Red Hat Enterprise Linux 81
- Red Hat Enterprise Linux 91
- Red Hat Enterprise Linux 101
- RockyLinux 8
- RockyLinux 9
- RockyLinux 10
- OracleLinux 8
- OracleLinux 9
- OracleLinux 10
- AlmaLinux 8
- AlmaLinux 9
- AlmaLinux 10
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 24.04 LTS
Note: 1 : no automated testing is performed on these platforms
Role Variables
defaults/main.yml
# php version
php_version: 7.4
# php release
php_release: php74
# Default PHP packages
php_packages:
- php
- php-common
- php-curl
- php-fpm
- php-gd
- php-gmp
- php-intl
- php-json
- php-mbstring
- php-mysqlnd
- php-xml
- php-zip
# Additional PHP packages
php_packages_additional: []
# Settings to configure in /etc/php.ini
php_ini_settings:
date.timezone: Europe/Amsterdam
post_max_size: 25M
upload_max_filesize: 25M
defaults/family-Debian.yml
# name of the php socket
php_socket: /run/php/php{{ php_version }}-fpm.sock
# OS specific packages
php_packages_os:
- libapache2-mod-php
# php-fpm service
php_fpm_service: "php{{ php_version }}-fpm"
# apache service
php_apache_service: apache2
defaults/family-RedHat.yml
# name of the php socket
php_socket: /var/run/php-fpm/www.sock
# OS specific packages
php_packages_os: []
# php-fpm service
php_fpm_service: "php-fpm"
# apache service
php_apache_service: httpd
defaults/family-Suse.yml
# name of the php socket
php_socket: /var/run/php-fpm/www.sock
# OS specific packages
php_packages_os: []
# php-fpm service
php_fpm_service: "php-fpm"
# apache service
php_apache_service: httpd
Example Playbook
molecule/default/converge.yml
- name: sample playbook for role 'php'
hosts: all
become: 'yes'
vars:
molecule_driver: '{{ lookup(''env'', ''MOLECULE_DRIVER_NAME'') }}'
openssl_fqdn: server.example.com
apache_fqdn: server.example.com
apache_ssl_key: '{{ openssl_server_key }}'
apache_ssl_crt: '{{ openssl_server_crt }}'
apache_ssl_chain: '{{ openssl_server_crt }}'
roles:
- deitkrachten.openssl
- deitkrachten.apache
tasks:
- name: Include role 'php'
ansible.builtin.include_role:
name: php