Execution
Date 23 Jan 2026 07:03:02 +0000
Duration 00:00:03.29
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.4 / 1.7.4
Python 3.10.10
Summary
1 Hosts
1 Tasks
1 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/zz-rm-logrotate.yaml

---
- name: Remove Ansible-generated backup files
  hosts: all
  gather_facts: false
  vars:
    target_files:
      - /etc/logrotate.d/alt-php80-fpm.logrotate
      - /etc/logrotate.d/alt-php81-fpm.logrotate
      - /etc/logrotate.d/alt-php82-fpm.logrotate
      - /etc/logrotate.d/alt-php83-fpm.logrotate
      - /etc/logrotate.d/alt-php84-fpm.logrotate
      - /etc/logrotate.d/alt-php85-fpm.logrotate

  tasks:
    - name: Delete backup file (if exists) for each target
      ansible.builtin.file:
        path: "{{ item }}~"
        state: absent
      loop: "{{ target_files }}"