forked from CESNET/perun-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook_mit_kerberos.yml
57 lines (48 loc) · 1.41 KB
/
playbook_mit_kerberos.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
# Role for installing MIT Kerberos along the Heimdal Kerberos
- name: "Install MIT Kerberos together with Heimdal Kerberos"
hosts:
- mit_kerberos
remote_user: root
pre_tasks:
- name: Require Debian
assert:
that:
- ansible_distribution == "Debian"
- ansible_distribution_major_version in [ "10" ]
msg: "Only Debian 10+ is supported"
tasks:
- name: "install libkadm5clnt-mit11"
apt:
name: libkadm5clnt-mit11
- name: "download deb package krb5-user"
command:
cmd: "apt-get download krb5-user"
chdir: /tmp
creates: krb5-user_*.deb
warn: false
- name: "find downloaded file name"
find:
paths: /tmp
patterns: 'krb5-user_*.deb'
recurse: no
register: debfiles
- set_fact:
debfile: "{{ debfiles.files[0].path }}"
- debug:
var: debfile
- name: "create directory /tmp/krb5-user"
file:
state: directory
path: /tmp/krb5-user
- name: "extract deb package to directory /tmp/krb5-user"
command:
cmd: "dpkg-deb --extract {{ debfile }} ."
chdir: /tmp/krb5-user
creates: /tmp/krb5-user/usr/share/doc/krb5-user/README.Debian
- name: "copy kadmin to /usr/bin/kadmin.mit"
copy:
remote_src: yes
src: /tmp/krb5-user/usr/bin/kadmin
dest: /usr/bin/kadmin.mit
mode: 0755