Execution
Date 23 Oct 2025 12:00:04 +0100
Duration 00:00:52.14
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
8 Hosts
5 Tasks
36 Results
1 Plays
1 Files
0 Records

File: /home/ssh-gateway/ansible/kuly/zz-show-pdns-vers.yaml

---
- name: Check PowerDNS Package Version on Alma8
  hosts: all
  gather_facts: true

  tasks:
    - name: Gather package facts
      ansible.builtin.package_facts:
        manager: auto

    - name: Display PowerDNS Recursor version
      ansible.builtin.debug:
        msg: "pdns-recursor {{ ansible_facts.packages['pdns-recursor'][0].version }}"
      when:
        - "'pdns-recursor' in ansible_facts.packages"
        - ansible_facts.packages['pdns-recursor'] | length > 0

    - name: Display PowerDNS Server version
      ansible.builtin.debug:
        msg: "pdns-server {{ ansible_facts.packages['pdns-server'][0].version }}"
      when:
        - "'pdns-server' in ansible_facts.packages"
        - ansible_facts.packages['pdns-server'] | length > 0

    - name: Report if no PowerDNS packages found
      ansible.builtin.debug:
        msg: "No PowerDNS packages installed"
      when:
        - "'pdns-recursor' not in ansible_facts.packages and 'pdns-server' not in ansible_facts.packages"