From 44646dacd59db844e039a9ca566c7c48e35abe1b Mon Sep 17 00:00:00 2001 From: spmfox Date: Sat, 17 Jun 2023 00:43:37 -0400 Subject: ansible-lint cleanup --- roles/guest-configure/tasks/user.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'roles/guest-configure/tasks/user.yml') 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" -- cgit