bookworm/roles/lmn_sssd/tasks/main.yml

27 lines
691 B
YAML
Raw Permalink Normal View History

2023-09-05 15:49:28 +02:00
---
- name: install needed packages
apt:
name:
- sssd-ad
- sssd-tools
- adcli
state: latest
- name: provide identities from directory
template:
src: sssd.conf.j2
dest: /etc/sssd/sssd.conf
mode: 0600
notify: restart sssd
## Either one of the variables is defined:
- name: join the domain
shell:
cmd: >
2024-02-03 16:42:19 +01:00
echo "{{ ansible_cmdline.adpw | default('') + adpw.user_input | default('') + joinpw | default('') }}" |
2023-09-05 15:49:28 +02:00
adcli join --stdin-password -U global-admin {{ domain | upper }}
when: >
ansible_cmdline.adpw | default('') | length > 0 or
2024-02-03 16:42:19 +01:00
adpw.user_input | default('') | length > 0 or
joinpw | default('') | length > 0