Execution
Date 26 Nov 2025 14:59:25 +0000
Duration 00:03:16.65
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.3 / 1.7.3
Python 3.10.10
Summary
393 Hosts
3 Tasks
1179 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10207-adjust-alt-php-logrotate.yaml

---
- name: Playbook to adjust logrotate
  hosts: all
  gather_facts: false
  tasks:
    - name: Get server info
      plesk_info:
      register: plsk

    - name: Check if /etc/logrotate.d/alt-php exists
      ansible.builtin.stat:
        path: /etc/logrotate.d/alt-php
      register: alt_php_logrotate_stat
      when: plsk.plesk_found and (plsk.imunify_found or plsk.cloudlinux_found)

    - name: Replace /etc/logrotate.d/alt-php with new version
      ansible.builtin.copy:
        src: RM10207-alt-php
        dest: /etc/logrotate.d/alt-php
        owner: root
        group: root
        mode: '0644'
      when:
        - plsk.plesk_found and (plsk.imunify_found or plsk.cloudlinux_found)
        - alt_php_logrotate_stat.stat.exists