--- - block: - name: Prefix the version of the PowerDNS Recursor package with the correct separator on RedHat set_fact: _pdns_rec_package_version: "-{{ pdns_rec_package_version }}" when: ansible_facts.os_family == 'RedHat' - name: Prefix the version of the PowerDNS Recursor package with the correct separator on Debian set_fact: _pdns_rec_package_version: "={{ pdns_rec_package_version }}" when: ansible_facts.os_family == 'Debian' when: pdns_rec_package_version != '' - name: Install the PowerDNS Recursor package: name: "{{ pdns_rec_package_name }}{{ _pdns_rec_package_version | default('') }}" state: present - name: Install PowerDNS Recursor debug symbols package: name: "{{ pdns_rec_debug_symbols_package_name }}{{ _pdns_rec_package_version | default('') }}" state: present when: pdns_rec_install_debug_symbols_package