-
-
Save eliasp/95b12809d19e9cdc0b07 to your computer and use it in GitHub Desktop.
Join a domain…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% from "domain/map.jinja" import domain with context %} | |
{% set ticket_available = "false" %} | |
{% if salt['cmd.retcode']('klist') == '0' %} | |
{% set ticket_available = "true" %} | |
{% endif %} | |
{% if ticket_available == "true" %} | |
domain-join-linux-realmd: | |
cmd.run: | |
- name: 'realm join {{ domain.data.domain }} --computer-ou="{{ domain.data.computer_ou }}"' | |
{% else %} | |
please-run-kinit: | |
test.configurable_test_state: | |
- name: No Kerberos ticket available | |
- comment: "Please run 'kinit your_user@{{ domain.data.domain|upper }}' to get a Kerberos ticket" | |
- changes: False | |
- result: False | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment