trixie/roles/lmn_sssd/tasks/main.yml

26 lines
704 B
YAML
Raw Normal View History

---
- name: Install needed packages
ansible.builtin.apt:
name:
- sssd-ad
- sssd-tools
- adcli
- name: Provide user identities from AD
ansible.builtin.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
ansible.builtin.shell:
2023-03-14 17:12:53 +01:00
cmd: >
2025-08-06 08:46:39 +02:00
echo "{{ ansible_cmdline.adpw | default('') + adpw.user_input | default('') + joinpw | default('') }}" |
2023-03-14 17:12:53 +01:00
adcli join --stdin-password -U global-admin {{ domain | upper }}
when: >
ansible_cmdline.adpw | default('') | length > 0 or
2025-08-06 08:46:39 +02:00
adpw.user_input | default('') | length > 0 or
joinpw is defined