feat(systemd): Update the systemd unit files to use configdrive
This makes it so that /media/configdrive can be used for user-data and network configs.
This commit is contained in:
parent
48df1be793
commit
69240a7e39
@ -4,8 +4,8 @@ Requires=system-config.target
|
|||||||
After=system-config.target
|
After=system-config.target
|
||||||
|
|
||||||
# Watch for configs at a couple common paths
|
# Watch for configs at a couple common paths
|
||||||
Requires=user-cloudinit@media-configdrive-openstack-latest-user_data.path
|
Requires=user-configdrive.path
|
||||||
After=user-cloudinit@media-configdrive-openstack-latest-user_data.path
|
After=user-configdrive.path
|
||||||
Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path
|
Requires=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path
|
||||||
After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path
|
After=user-cloudinit@var-lib-coreos\x2dinstall-user_data.path
|
||||||
|
|
||||||
|
5
units/user-configdrive.path
Normal file
5
units/user-configdrive.path
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Watch for a cloud-config at /media/configdrive
|
||||||
|
|
||||||
|
[Path]
|
||||||
|
DirectoryNotEmpty=/media/configdrive
|
@ -1,9 +1,8 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Load cloud-config from %f
|
Description=Load cloud-config from /media/configdrive
|
||||||
Requires=coreos-setup-environment.service
|
Requires=coreos-setup-environment.service
|
||||||
After=coreos-setup-environment.service
|
After=coreos-setup-environment.service
|
||||||
Before=user-config.target
|
Before=user-config.target
|
||||||
ConditionFileNotEmpty=%f
|
|
||||||
|
|
||||||
# HACK: work around ordering between config drive and ec2 metadata It is
|
# HACK: work around ordering between config drive and ec2 metadata It is
|
||||||
# possible for OpenStack style systems to provide both the metadata service
|
# possible for OpenStack style systems to provide both the metadata service
|
||||||
@ -21,4 +20,4 @@ After=ec2-cloudinit.service
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
EnvironmentFile=-/etc/environment
|
EnvironmentFile=-/etc/environment
|
||||||
ExecStart=/usr/bin/coreos-cloudinit --from-file=%f
|
ExecStart=/usr/bin/coreos-cloudinit --from-configdrive=/media/configdrive
|
Loading…
Reference in New Issue
Block a user