+---
+
+#- name: realmd package
+# package:
+# name: realmd
+# state: present
+
+- name: Set up NSS, PAM, KRB5, ...
+ fail:
+ msg: "Invalid auth_method: {{ auth_method }}"
+ when: auth_method != 'files' and auth_method != 'winbind'
+
+# FIXME: We don't generally use this so just select sssd for now
+- name: Set up NSS, PAM, ...
+ command: authselect select sssd
+ when: auth_method == 'files'
+
+# authselect-migration(7) says to use realm(8). However, this wants
+# to join the domain and it isn't clear that it knows how to set this
+# up for the Samba registry
+- name: Set up NSS, PAM, KRB5, ...
+ command: authselect select -f winbind with-krb5
+ when: auth_method == 'winbind'
+
+- name: Install krb5.conf snippet
+ template:
+ src: krb5_conf.j2
+ dest: /etc/krb5.conf.d/autocluster-winbind