Skip to content

Commit 843ae90

Browse files
committed
Install persistent-tokens on SQL
1 parent 36b425a commit 843ae90

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- name: restart persistent-tokens
2+
systemd:
3+
daemon_reload: yes
4+
name: persistent-tokens.service
5+
enabled: yes
6+
state: restarted

ansible/roles/sql-remctl/tasks/main.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- remctl-client
77
- python-ldap
88
- python-sqlalchemy
9-
# TODO: Build and install admof
9+
- kstart
1010
- name: Install remctl-pony
1111
command: git clone https://github.com/mit-scripts/sql-remctl.git /srv/remctl-pony
1212
args:
@@ -42,3 +42,16 @@
4242
creates: /srv/accountadm/admof
4343
become: yes
4444
become_user: scripts-build
45+
- name: Install systemd unit for fetching tokens
46+
copy:
47+
dest: /etc/systemd/system/persistent-tokens.service
48+
content: |
49+
[Unit]
50+
Description=Persistent tokens for remctl-pony
51+
After=network-online.target
52+
ConditionPathExists=/etc/daemon.keytab
53+
[Service]
54+
ExecStart=/usr/bin/k5start -f /etc/daemon.keytab -u daemon/sql.mit.edu -t -K 15m -l6h
55+
[Install]
56+
WantedBy=multi-user.target
57+
notify: restart persistent-tokens

0 commit comments

Comments
 (0)