# Copyright 2019-2024 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: Run as root
  # become: true
  connection: local
  # gather_facts: true
  hosts:
    - localhost
  vars:
    ansible_python_interpreter: /usr/bin/python3
  tasks:

    - name: Debug ansible_effective_user_id
      ansible.builtin.debug:
        var: ansible_effective_user_id

    - name: Debug ansible_user_id
      ansible.builtin.debug:
        var: ansible_user_id

    - name: Debug ansible_user_dir
      ansible.builtin.debug:
        var: ansible_user_dir

    - name: Include php role as root
      ansible.builtin.include_role:
        name: php
      vars:  # noqa var-naming[no-role-prefix]
        php: true
        php_fpm_pool_check_fail: false
...