Execution
Date 26 Nov 2025 15:06:15 +0000
Duration 00:03:06.22
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
1177 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

    - 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: alt_php_logrotate_stat.stat.exists