diff options
| author | spmfox <spmfox@foxwd.com> | 2023-06-17 00:43:37 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2023-06-17 00:43:37 -0400 |
| commit | 44646dacd59db844e039a9ca566c7c48e35abe1b (patch) | |
| tree | 6a25d4316c807327ff015c719ecec97b76ab58f7 /roles/guest-configure/tasks/user.yml | |
| parent | f035f1f259dd617e8d4459008d7e1165ea04c025 (diff) | |
ansible-lint cleanup
Diffstat (limited to 'roles/guest-configure/tasks/user.yml')
| -rw-r--r-- | roles/guest-configure/tasks/user.yml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/roles/guest-configure/tasks/user.yml b/roles/guest-configure/tasks/user.yml index 5be5b3f..8f3e27d 100644 --- a/roles/guest-configure/tasks/user.yml +++ b/roles/guest-configure/tasks/user.yml @@ -16,35 +16,35 @@ when: guest_configure_ssh_key|length > 0 - name: RedHat block + when: ansible_os_family == "RedHat" block: - name: Add user to sudo group (RedHat) ansible.builtin.user: name: "{{ guest_configure_user }}" groups: "wheel" - append: yes + append: true - name: Allow wheel group nopasswd in sudoers (RedHat) - lineinfile: + ansible.builtin.lineinfile: path: /etc/sudoers state: present regexp: '^%wheel' line: '%wheel ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s' - when: ansible_os_family == "RedHat" - name: Debian block + when: ansible_os_family == "Debian" block: - name: Add user to sudo group (Debian) ansible.builtin.user: name: "{{ guest_configure_user }}" groups: "sudo" - append: yes + append: true - name: Allow sudo group nopasswd in sudoers (Debian) - lineinfile: + ansible.builtin.lineinfile: path: /etc/sudoers state: present regexp: '^%sudo' line: '%sudo ALL=(ALL) NOPASSWD: ALL' validate: 'visudo -cf %s' - when: ansible_os_family == "Debian" |
