Execution
Date 23 Jan 2026 06:39:08 +0000
Duration 00:00:02.53
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
0 Hosts
1 Tasks
0 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/RM10207-second-upload.yaml

---
- name: Playbook to upload logrotates
  hosts: all
  gather_facts: false
  vars:
    files_to_upload:
      - alt-php80-fpm.logrotate
      - alt-php81-fpm.logrotate
      - alt-php82-fpm.logrotate
      - alt-php83-fpm.logrotate
      - alt-php84-fpm.logrotate
      - alt-php85-fpm.logrotate
  tasks:
    - name: Get plesk info
      plesk_info:
      register: plsk
    - name: On plesk with imunify or cl
      when: (plsk.plesk_found and plsk.imunify_found) or (plsk.plesk_found and plsk.cloudlinux_found)
      block:
        - name: Check if /etc/logrotate.d/alt-php exists
          ansible.builtin.stat:
            path: /etc/logrotate.d/alt-php
          register: alt_php_logrotate_stat
        - name: Upload the missing files
          when: alt_php_logrotate_stat.stat.exists
          loop: "{{ files_to_upload }}"
          ansible.builtin.copy:
            src: "{{ item }}"
            dest: "/etc/logrotate.d/{{ item }}"
            user: root
            group: root
            mode: '0644'