homelab/ansible/playbooks/sssd.yml

25 lines
602 B
YAML
Raw Normal View History

---
- hosts: all
roles:
- role: ansible-role-sssd
2022-11-29 20:23:44 +00:00
become: true
tasks:
- name: simulate login
stat:
path: "/home/{{user.name}}"
become: true
become_user: "{{user.name}}"
when: sssd_configure == true
- name: create profil
user:
2022-11-29 20:23:44 +00:00
name: "{{user.name}}"
create_home: yes
password: "{{userPassword}}"
system: no
state: present
ssh_key_file: .ssh/id_rsa
uid: "{{ user.uid }}"
shell: /bin/bash
when: sssd_configure is not defined or sssd_configure == false
2022-11-11 16:47:00 +00:00
become: true