-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkinit.yml
More file actions
33 lines (29 loc) · 689 Bytes
/
Copy pathkinit.yml
File metadata and controls
33 lines (29 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: CONFIGURE KINIT
hosts: all
# become: yes
connection: ssh
gather_facts: no
tasks:
- name: EXECUTE EXPECT TO GENERATE KERBEROS TICKET
shell: |
# set timeout 60
spawn kinit admin
expect ":"
send "{{ my_kerberos_master_password }}"
interact
# args:
# executable: /usr/bin/expect
register: shelloutput
- name: OUTPUT SCRIPT DETAIL
debug:
msg: "{{ shelloutput }}"
# - name: INSTALL PEXPECT REQUIRED FOR EXPECT MODULE
# yum:
# name: pexpect
# state: latest
# - name: KINIT ADMIN
# expect:
# command: kinit admin
# responses:
# (?i)password: "{{ my_kerberos_master_password }}"