Setting plugins to absent
Active plugins fail when set to absent as they need to be deactivated first:
TASK [wordpress : WP Piwik plugin absent] ********************************************************************************************
fatal: [example.org]: FAILED! =>
changed: false
cmd:
- /usr/bin/php8.3
- --php-ini
- /home/example/.php.ini
- /usr/local/bin/wp
- --no-color
- plugin
- uninstall
- wp-piwik
delta: '0:00:04.782432'
end: '2025-07-03 06:01:25.279136'
failed_when_result: true
msg: non-zero return code
rc: 1
start: '2025-07-03 06:01:20.496704'
stderr: |-
Warning: The 'wp-piwik' plugin is active.
Error: No plugins uninstalled.
stderr_lines: <omitted>
stdout: ''
stdout_lines: <omitted>