Commit 3d6c4152 authored by Lars Beckers's avatar Lars Beckers

ad-auth: use pexpect for kinit if possible

parent 6105b3d6
......@@ -26,6 +26,16 @@
command: realm discover -v "{{ domain }}"
- name: get a kerberos ticket
shell: echo "{{ lookup('passwordstore', 'samba-admin') }}" | kinit Administrator
when: debian_version == "jessie"
- name: ensure pexpect is installed
apt: name=python-pexpect state=installed
when: debian_version == "stretch"
- name: get a kerberos ticket
expect:
command: kinit Administrator
responses:
"Password for Administrator@{{ domain.upper() }}": "{{ lookup('passwordstore', 'samba-admin') }}"
when: debian_version == "stretch"
- name: leave any other realm
command: realm leave
register: result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment