File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,13 @@ data "ignition_systemd_unit" "ssh-key-agent" {
1919 }
2020 )
2121}
22+
23+ data "ignition_systemd_unit" "ssh-key-agent-download" {
24+ name = " ssh-key-agent-download.service"
25+ enabled = var. enabled
26+ content = templatefile (" ${ path . module } /resources/ssh-key-agent-download.service" ,
27+ {
28+ source = " https://github.com/utilitywarehouse/ssh-key-agent/releases/download/${ var . agent_version } /ssh-key-agent_${ var . agent_version } _linux_amd64"
29+ }
30+ )
31+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ output "unit" {
22 value = data. ignition_systemd_unit . ssh-key-agent . rendered
33}
44
5+ output "download-unit" {
6+ value = data. ignition_systemd_unit . ssh-key-agent-download . rendered
7+ }
8+
59output "file" {
610 value = data. ignition_file . ssh-key-agent . rendered
711}
Original file line number Diff line number Diff line change 1+ [Unit]
2+ Description =ssh-key-agent-download
3+ Wants =network-online.target
4+ After =network-online.target
5+ Before =ssh-key-agent.service
6+
7+ [Service]
8+ Type =oneshot
9+ Restart =on-failure
10+ ExecStart =-/usr/bin/wget -N -q -O "/opt/bin/ssh-key-agent" "${source}"
11+ ExecStart =-/usr/bin/chmod 755 /opt/bin/ssh-key-agent
12+ ExecStartPost =/bin/systemctl disable ssh-key-agent-download.service
13+
14+ [Install]
15+ WantedBy =multi-user.target
You can’t perform that action at this time.
0 commit comments