Adds playbooks/phpcheck.yml: reports the PHP version of each host and of every running Docker container (docker exec <container> php -r 'echo PHP_VERSION;'), one line per host/container, marked OK / VULNERABLE / VULNERABLE (EOL) / UNKNOWN against the minimum patched versions in vars (8.2.35, 8.3.36, 8.4.27, 8.5.12; branches older than 8.2 count as EOL). Read-only, changed_when: false.
Docker access: containers are listed without sudo first (root / docker-group users need no flags). On a permission/socket error the playbook retries with sudo and then runs docker exec with sudo too. Clear status lines instead of silent output: docker: not installed, docker: no running containers, docker: no access, run with -K, docker: no access, wrong sudo password, docker: error (...). Hosts/containers without PHP show none.
Usage:
ansible-playbook playbooks/phpcheck.yml
ansible-playbook playbooks/phpcheck.yml -K # only if sudo needs a password
Tested only locally: ansible-playbook --syntax-check, ansible-lint (production profile, 0 failures) and runs against localhost with shimmed php/docker/sudo (direct access, permission denied + passwordless sudo, sudo needing a password with and without password, wrong password, zero containers, daemon down, no docker). Not yet run against real hosts.
Adds `playbooks/phpcheck.yml`: reports the PHP version of each host and of every running Docker container (`docker exec <container> php -r 'echo PHP_VERSION;'`), one line per host/container, marked OK / VULNERABLE / VULNERABLE (EOL) / UNKNOWN against the minimum patched versions in `vars` (8.2.35, 8.3.36, 8.4.27, 8.5.12; branches older than 8.2 count as EOL). Read-only, `changed_when: false`.
Docker access: containers are listed without sudo first (root / docker-group users need no flags). On a permission/socket error the playbook retries with sudo and then runs `docker exec` with sudo too. Clear status lines instead of silent output: `docker: not installed`, `docker: no running containers`, `docker: no access, run with -K`, `docker: no access, wrong sudo password`, `docker: error (...)`. Hosts/containers without PHP show `none`.
Usage:
```bash
ansible-playbook playbooks/phpcheck.yml
ansible-playbook playbooks/phpcheck.yml -K # only if sudo needs a password
```
Tested only locally: `ansible-playbook --syntax-check`, `ansible-lint` (production profile, 0 failures) and runs against localhost with shimmed `php`/`docker`/`sudo` (direct access, permission denied + passwordless sudo, sudo needing a password with and without password, wrong password, zero containers, daemon down, no docker). Not yet run against real hosts.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds
playbooks/phpcheck.yml: reports the PHP version of each host and of every running Docker container (docker exec <container> php -r 'echo PHP_VERSION;'), one line per host/container, marked OK / VULNERABLE / VULNERABLE (EOL) / UNKNOWN against the minimum patched versions invars(8.2.35, 8.3.36, 8.4.27, 8.5.12; branches older than 8.2 count as EOL). Read-only,changed_when: false.Docker access: containers are listed without sudo first (root / docker-group users need no flags). On a permission/socket error the playbook retries with sudo and then runs
docker execwith sudo too. Clear status lines instead of silent output:docker: not installed,docker: no running containers,docker: no access, run with -K,docker: no access, wrong sudo password,docker: error (...). Hosts/containers without PHP shownone.Usage:
Tested only locally:
ansible-playbook --syntax-check,ansible-lint(production profile, 0 failures) and runs against localhost with shimmedphp/docker/sudo(direct access, permission denied + passwordless sudo, sudo needing a password with and without password, wrong password, zero containers, daemon down, no docker). Not yet run against real hosts.