Users: define the uid accordito LDAP
This commit is contained in:
@ -11,12 +11,20 @@
|
||||
ansible.builtin.user:
|
||||
name: "{{ item.name }}"
|
||||
home: /home/{{ item.name }}
|
||||
uid: "{{ item.uid }}"
|
||||
shell: '{{ bash_path }}'
|
||||
groups: sudo
|
||||
append: true
|
||||
state: present
|
||||
with_items: "{{ user_details }}"
|
||||
|
||||
- name: All hosts | Create the groups
|
||||
ansible.builtin.group:
|
||||
name: "{{ item.name }}"
|
||||
gid: "{{ item.uid }}"
|
||||
state: present
|
||||
with_items: "{{ user_details }}"
|
||||
|
||||
- name: All hosts | Set up home directory permissions for users
|
||||
ansible.builtin.file:
|
||||
path: /home/{{ item.name }}
|
||||
@ -33,13 +41,6 @@
|
||||
mode: 0700
|
||||
with_items: "{{ user_details }}"
|
||||
|
||||
#- name: All hosts | Add ssh keys for allowing connections
|
||||
# ansible.builtin.template:
|
||||
# src: authorized_keys
|
||||
# dest: /home/vinishor/.ssh/authorized_keys
|
||||
# owner: vinishor
|
||||
# mode: 0600
|
||||
|
||||
- name: Linux | Correct sudoers file permissions for ansible user
|
||||
ansible.builtin.file:
|
||||
path: "/etc/sudoers.d/ansible"
|
||||
|
Reference in New Issue
Block a user