Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 3ca5619

Browse files
committed
Updating-sudoers-task-PR-2.x
1 parent 5e2bbac commit 3ca5619

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

roles/debian/sudo_config/tasks/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
state: directory
66
mode: "0750"
77

8-
- name: Create temporary directory for sudoers validation
8+
- name: Create temporary directory for sudoers validation.
99
ansible.builtin.tempfile:
1010
state: directory
1111
suffix: sudoers
1212
register: temp_sudoers_dir
1313
when: sudo_config | default([]) | length > 0
1414

15-
- name: Create sudoers file for validation
15+
- name: Create sudoers file for validation.
1616
ansible.builtin.template:
1717
src: "sudoer.j2"
1818
dest: "{{ temp_sudoers_dir.path }}/{{ item.filename }}"
@@ -23,7 +23,7 @@
2323
with_items: "{{ sudo_config if sudo_config is iterable and sudo_config is not mapping else [sudo_config] }}"
2424
register: sudo_templates
2525

26-
- name: Validate sudoers file on remote
26+
- name: Validate sudoers file on remote.
2727
ansible.builtin.command: "visudo -cf {{ temp_sudoers_dir.path }}/{{ item.filename }}"
2828
register: visudo_check
2929
failed_when: visudo_check.rc != 0
@@ -34,7 +34,7 @@
3434
label: "{{ item.filename }}"
3535
delegate_to: "{{ inventory_hostname }}"
3636

37-
- name: Install validated sudoers file
37+
- name: Install validated sudoers file.
3838
ansible.builtin.copy:
3939
src: "{{ temp_sudoers_dir.path }}/{{ item.filename }}"
4040
dest: "/etc/sudoers.d/{{ item.filename }}"
@@ -45,7 +45,7 @@
4545
when: item.entity_name | default('') | length > 0
4646
with_items: "{{ sudo_config if sudo_config is iterable and sudo_config is not mapping else [sudo_config] }}"
4747

48-
- name: Clean up temporary files
48+
- name: Clean up temporary files.
4949
ansible.builtin.file:
5050
path: "{{ temp_sudoers_dir.path }}"
5151
state: absent

0 commit comments

Comments
 (0)