-
Chris Croome authoredChris Croome authored
main.yml 10.48 KiB
# Copyright 2019-2023 Chris Croome
#
# This file is part of the Webarchitects PHP Ansible role.
#
# The Webarchitects PHP Ansible role is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# The Webarchitects PHP Ansible role is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with the Webarchitects PHP Ansible role. If not, see <https://www.gnu.org/licenses/>.
---
- name: PHP
block:
- name: Include apt role local fact tasks
ansible.builtin.include_role:
name: apt
tasks_from: local_facts.yml
when: >-
( ansible_local.dpkg.arch is not defined ) or
( ansible_local.gpg.version is not defined ) or
( ansible_local.bash.path is not defined )
tags:
- php_apt
- name: Include PHP check tasks
ansible.builtin.include_tasks: checks.yml
tags:
- php_conf
- name: Include Sury PHP apt repo tasks
ansible.builtin.include_tasks: apt.yml
when: php_sury is defined
tags:
- php_apt
- name: Include PHP package tasks
ansible.builtin.include_tasks: pkg.yml
when: php_versions is defined
tags:
- php_pkg
- name: Include PHP configuration tasks
ansible.builtin.include_tasks: conf.yml
when: php_config is defined
tags:
- php_conf
# - name: Install and configure PHP
# block:
#
# - name: PHP present
# ansible.builtin.include_tasks: php_present.yml
# when:
# - php.state == "present"
#
# - name: Configure PHP
# block:
#
# - name: Loop through the PHP versions to configure SAPIs and modules
# ansible.builtin.include_tasks: version.yml
# loop: "{{ php.versions | dict2items }}"
# loop_control:
# loop_var: php_version
# label: "{{ php_version.key }}"
#
# - name: Debug fail
# ansible.builtin.fail:
#
# - name: Configure PHP
# block: