Execution
Date 27 Nov 2024 13:46:42 +0000
Duration 00:00:01.09
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
1 Hosts
1 Tasks
1 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/check-dns.yaml

---
- name: Check if ttl is zero
  hosts: all
  tasks:
    - name: Check via plesk
      ansible.builtin.shell: |
        set -o pipefail
        plesk db -e "select * from dns_recs where ttl=0;"
      args:
        executable: /bin/bash
      changed_when: false
      register: plesk_out
        #    - name: Save hostname if stdout is not empty
        #      when: plesk_out.stdout | length > 0
        #      ansible.builtin.lineinfile:
        #        path: "/home/ssh-gateway/ansible/check-dns-hosts-updated.txt"
        #        line: "{{ inventory_hostname }}"
        #        create: true
        #        mode: '0644'
        #      delegate_to: 127.0.0.1