-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd/system: add oem cloud init service
these services, based on the ignition execution result will enable or not cloudinit based on OEM. Signed-off-by: Mathieu Tortuyaux <[email protected]>
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Unit] | ||
Description=Enable cloudinit | ||
|
||
[Service] | ||
Type=oneshot | ||
StandardInput=file:/etc/.ignition-result.json | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
tormath1
Author
Contributor
|
||
ExecCondition=/usr/bin/jq -e '.userConfigProvided == false' | ||
ExecCondition=/usr/bin/jq -e '.provisioningBootID | gsub(\"-\"; \"\") | . == $id' --arg id %b | ||
ExecStart=/usr/bin/systemctl enable --now oem-cloudinit.service | ||
RemainAfterExit=true | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
1 change: 1 addition & 0 deletions
1
systemd/system/multi-user.target.wants/enable-oem-cloudinit.service
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 @@ | ||
../enable-oem-cloudinit.service |
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,11 @@ | ||
[Unit] | ||
Description=Run cloudinit | ||
|
||
[Service] | ||
EnvironmentFile=/var/run/ignition.env | ||
This comment has been minimized.
Sorry, something went wrong. |
||
Type=oneshot | ||
ExecCondition=/usr/bin/bash -xc 'OEMS=(ec2-compat gce rackspace-onmetal azure cloudsigma packet vmware digitalocean); [[ "$${OEMS[*]}" =~ "${OEM_ID}" ]]' | ||
This comment has been minimized.
Sorry, something went wrong.
pothos
Member
|
||
ExecStart=/usr/bin/coreos-cloudinit --oem="${OEM_ID}" | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
same question here: where is this coming from?