Skip to content

Commit

Permalink
simplify the kerberos config
Browse files Browse the repository at this point in the history
  • Loading branch information
kayiwa committed Nov 24, 2024
1 parent 1c7f12b commit b075eb6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
12 changes: 0 additions & 12 deletions roles/sssd_ad/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@
register: realm_discovery
changed_when: false

- name: Sssd_ad | Ensure domain can be discovered
ansible.builtin.fail:
msg: "Failed to discover {{ ad_domain }}. Check DNS and network settings"
when:
- running_on_server
- "'realm-name: {{ ad_domain }}' not in realm_discover.stdout"

- name: Sssd_ad | join the domain
ansible.builtin.command: realm join -U {{ ad_admin_user }} {{ ad_domain }}
vars:
Expand All @@ -73,11 +66,6 @@
register: realm_list
changed_when: false

- name: Sssd_ad | Ensure domain is listed
ansible.builtin.fail:
msg: "The domain {{ ad_domain }} is not listed. Join may have failed."
when: "'realm-name: {{ ad_domain }}' not in realm_list.stdout"

- name: Sssd_ad | Configure sssd.conf
ansible.builtin.template:
src: sssd.conf.j2
Expand Down
14 changes: 1 addition & 13 deletions roles/sssd_ad/templates/krb5.conf.j2
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
[libdefaults]
udp_preference_limit = 0
default_realm = {{ ad_domain | upper }}
dns_lookup_realm = false
dns_lookup_kdc = true

[realms]
{{ ad_domain | upper }} = {
kdc = {{ ad_domain }}
admin_server = {{ ad_domain }}
}

[domain_realm]
.{{ ad_domain }} = {{ ad_domain | upper }}
{{ ad_domain }} = {{ ad_domain | upper }}

0 comments on commit b075eb6

Please sign in to comment.