25 lines
602 B
YAML
25 lines
602 B
YAML
---
|
|
- hosts: all
|
|
roles:
|
|
- role: ansible-role-sssd
|
|
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:
|
|
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
|
|
become: true
|