--- - name: ADD ADMIN USER become: true hosts: all gather_facts: false vars: username: "mkt.admin" tasks: - name: ADD USER ansible.builtin.user: name: "{{ username }}" password: "$y$j9T$spf7hlSZlDhexe9PqykRW1$.f5c.FYYJ.HIcVMUx9GTnwUgzxtygvXg3zb8kNcQKX." shell: "/bin/bash" create_home: true - name: CREATE SUDORULES ansible.builtin.copy: dest: "/etc/sudoers.d/{{ username }}" content: "{{ username }} ALL=(ALL:ALL) NOPASSWD: ALL" owner: root mode: "0600"