forked from RPi-Distro/pi-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add amazon ssm agent and the ability to provision on boot through /bo…
…ot/ssm
- Loading branch information
1 parent
8af78a3
commit 21237a6
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
vim tmux git bc jq locate gawk fbi | ||
vim tmux git bc jq locate gawk fbi awscli ansible python-lxml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=Tells the system that it wants to use SSM with the configuration in the /boot/ssm file | ||
ConditionPathExists=/boot/ssm | ||
Before=amazon-ssm-agent.service | ||
Requires=amazon-ssm-agent.service | ||
Wants=network-online.service | ||
After=network-online.service | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/bin/bash -c "set -a && source /boot/ssm && amazon-ssm-agent --register --code \"$SSM_CODE\" --id \"$SSM_ID\" --region \"$SSM_REGION\" -y" | ||
ExecStart=/bin/rm -f /boot/ssm | ||
ExecStartPost=/bin/systemctl try-restart amazon-ssm-agent | ||
|
||
[Install] | ||
WantedBy=multi-user.target |