Skip to content

Commit ec642b9

Browse files
committed
I think this config needs tweaking
We want the timer to be optionally enabled. The service will be linked and run by the timer and should not be run otherwise.
1 parent c7a59bf commit ec642b9

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

goss.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ file:
88
owner: buildkite-agent
99
group: buildkite-agent
1010

11+
/etc/systemd/system/refresh_authorized_keys.service:
12+
exists: true
13+
14+
/etc/systemd/system/refresh_authorized_keys.timer:
15+
exists: true
16+
1117
/var/lib/buildkite-agent/builds:
1218
filetype: directory
1319
exists: true
@@ -128,6 +134,13 @@ command:
128134
wget --version:
129135
exit-status: 0
130136

137+
# Check refresh authorized keys gear is present, but disabled.
138+
# disabled: The unit file is not enabled, but contains an [Install] section with installation instructions.
139+
systemctl is-enabled refresh_authorized_keys.timer:
140+
exit-status: 1
141+
stdout:
142+
- /disabled/
143+
131144
systemctl is-enabled docker-gc.timer:
132145
exit-status: 0
133146

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
[Unit]
22
Description=Download ssh authorized_keys file from s3
3-
Wants=refresh_authorized_keys.service
43

54
[Service]
65
Type=oneshot
76
ExecStart=/usr/local/bin/refresh_authorized_keys
8-
9-
[Install]
10-
WantedBy=multi-user.target

0 commit comments

Comments
 (0)