--- - hosts: service remote_user: "{{ user }}" gather_facts: no vars: user: "zeus" tasks: - name: no sudo passwd become: true copy: src: "../files/sudo" dest: "/etc/sudoers.d/{{ ruser }}" owner: root group: root mode: 0440