--- - name: Obtain the version of the running PowerDNS Authoritative Server shell: "pdns_server --version 2>&1 | awk '/PowerDNS Authoritative/{print $7}'" register: _pdns_version check_mode: no changed_when: False - name: Export the running PowerDNS Authoritative Server version to a variable set_fact: _pdns_running_version: "{{ _pdns_version['stdout'] }}"