Execution
Date 26 Jan 2026 08:58:28 +0000
Duration 00:00:18.56
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
26 Hosts
4 Tasks
98 Results
1 Plays
1 Files
0 Records

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

---
- name: 10278 redmine tasks
  hosts: all
  gather_facts: false
  vars:
    need_exists:
      - /usr/local/cron_backup/flock_pva_backups.sh
      - /usr/local/cron_backup/verify.sh
    obsoleted:
      - /usr/local/cron_backup/conf/flock.conf
      - /usr/local/cron_backup/conf/verify.conf
  tasks:
    - name: Check that required files exist
      ansible.builtin.stat:
        path: "{{ item }}"
      register: needed_files
      loop: "{{ need_exists }}"

    - name: Fail if any required file is missing
      ansible.builtin.fail:
        msg: "Required file '{{ item.item }}' does not exist!"
      loop: "{{ needed_files.results }}"
      when: not item.stat.exists

    - name: Check that obsolete files do NOT exist
      ansible.builtin.stat:
        path: "{{ item }}"
      register: obsolete_files
      loop: "{{ obsoleted }}"

    - name: Fail if any obsolete file still exists
      ansible.builtin.fail:
        msg: "Obsolete file '{{ item.item }}' should be removed!"
      loop: "{{ obsolete_files.results }}"
      when: item.stat.exists