Simplifying group management
This commit is contained in:
@@ -34,15 +34,14 @@
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
loop:
|
||||
- ssh-allow
|
||||
- ssh-forward
|
||||
- sftp-home-jail
|
||||
- ssh
|
||||
- sftp
|
||||
|
||||
- name: Add SSH user to ssh-allow
|
||||
- name: Add SSH user to ssh group
|
||||
become: yes
|
||||
user:
|
||||
name: "{{ ansible_user_id }}"
|
||||
groups: ssh-allow
|
||||
groups: ssh
|
||||
append: yes
|
||||
|
||||
- name: Copy the SSH key
|
||||
@@ -75,7 +74,7 @@
|
||||
file:
|
||||
path: /etc/ssh/includes
|
||||
state: directory
|
||||
user: root
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
|
||||
|
Reference in New Issue
Block a user