b55a2ee047
Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
23 lines
530 B
YAML
23 lines
530 B
YAML
---
|
|
# Filter SSH on groups
|
|
- name: Filter SSH on groups
|
|
lineinfile:
|
|
dest: /etc/ssh/sshd_config
|
|
regexp: '^AllowGroups'
|
|
line: "AllowGroups root sudoldap aurore ssh"
|
|
|
|
# To gain root access with ldap rights
|
|
- name: Install SUDO package
|
|
package:
|
|
name: sudo
|
|
state: present
|
|
register: package_result
|
|
retries: 3
|
|
until: package_result is succeeded
|
|
|
|
# Set sudo group
|
|
- name: Configure sudoers
|
|
lineinfile:
|
|
dest: /etc/sudoers
|
|
regexp: "^%{{ sudo_group }}"
|
|
line: "%{{ sudo_group }} ALL=(ALL:ALL) ALL"
|