- block: - name: Creating a file with content copy: dest: "/etc/polkit-1/rules.d/50_disable_pol.rules" content: | polkit.addRule(function(action, subject) { if (action.id == "org.freedesktop.NetworkManager.wifi.scan") { return polkit.Result.YES; } }); become: "{{ false if inventory_hostname == 'nas.home.lan' else true }}"