Execution
Date 25 Sep 2024 12:30:19 +0100
Duration 00:02:53.50
Controller ssh-gw-4.layershift.com
User root
Versions
Ansible 2.16.11
ara 1.7.2 / 1.7.2
Python 3.10.10
Summary
166 Hosts
9 Tasks
1455 Results
1 Plays
11 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/check_if_cron_enabled.yaml

---
- name: Playbook to check if there is left cron as per RM9718
  hosts: all
  gather_facts: false
  roles:
    - plesk
    - imunify360
  tasks:
    - name: If plesk imunify list if cron
      when: plesk_found and imunify_found
      ansible.builtin.shell: |
        set -o pipefail
        ls -la /etc/cron.d/imunify360-firewall-update
      args:
        executable: /bin/bash
      changed_when: false
      register: imout
    - name: Save to a file those that are not
      when: imout.rc == 2
      ansible.builtin.lineinfile:
        path: /home/ssh-gateway/ansible/kuly/missing-im
        line: "{{ ansible_hostname }}"
        create: true
        mode: '0644'
      delegate_to: 127.0.0.1