Compare commits
No commits in common. "main" and "testbranch" have entirely different histories.
main
...
testbranch
4 changed files with 1 additions and 18 deletions
|
|
@ -94,8 +94,6 @@ This role manages local Linux users, groups, SSH access, SSH keys, and sudo perm
|
||||||
|
|
||||||
The role is designed to be multi-distribution and does not rely on distro-specific groups such as `sudo` or `wheel`.
|
The role is designed to be multi-distribution and does not rely on distro-specific groups such as `sudo` or `wheel`.
|
||||||
|
|
||||||
The SSH service name is picked automatically (`ssh` on Debian-family distros, `sshd` elsewhere); set `users_sshd_service_name` if your distro uses a different name.
|
|
||||||
|
|
||||||
## Managed groups
|
## Managed groups
|
||||||
The role uses these groups:
|
The role uses these groups:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,2 @@
|
||||||
---
|
---
|
||||||
# defaults file for users
|
# defaults file for users
|
||||||
|
|
||||||
# Name of the SSH service unit. Debian-family distros call it "ssh",
|
|
||||||
# most others (RedHat, Suse, Arch, ...) call it "sshd".
|
|
||||||
# Override this if your distro uses a different name.
|
|
||||||
users_sshd_service_name: "{{ 'ssh' if ansible_facts['os_family'] == 'Debian' else 'sshd' }}"
|
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
---
|
---
|
||||||
- name: Restart sshd
|
- name: Restart sshd
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: "{{ users_sshd_service_name }}"
|
name: ssh
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,5 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
# The play runs with gather_facts: false, but the sshd handler needs
|
|
||||||
# ansible_facts['os_family'] to pick the right service name.
|
|
||||||
- name: Gather minimal facts if the play skipped fact gathering
|
|
||||||
ansible.builtin.setup:
|
|
||||||
gather_subset:
|
|
||||||
- "!all"
|
|
||||||
when: ansible_facts['os_family'] is not defined
|
|
||||||
tags:
|
|
||||||
- always
|
|
||||||
|
|
||||||
- name: Manage sudoers
|
- name: Manage sudoers
|
||||||
ansible.builtin.import_tasks: sudoers.yaml
|
ansible.builtin.import_tasks: sudoers.yaml
|
||||||
tags:
|
tags:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue