diff --git a/tasks/main.yml b/tasks/main.yml index 2c7d903..b23ebf1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,6 +19,7 @@ system: no # not required. When creating an account C(state=present), setting this to C(yes) makes the user a system account. This setting cannot be changed on existing users. state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated. ssh_key_file: .ssh/id_rsa # not required. Optionally specify the SSH key filename. If this is a relative filename then it will be relative to the user's home directory. + uid: 1024 - name : set sudoers right lineinfile: @@ -33,7 +34,7 @@ validate: 'visudo -cf "%s"' with_items: - regexp: '^%{{username}}\s' - line: '%{{username}} ALL = (ALL) ALL' + line: '%{{username}} ALL = (ALL) NOPASSWD:ALL' - name: Ensure /etc/sudoers includes /etc/sudoers.d