Safe Haskell | None |
---|---|
Language | Haskell98 |
- module Propellor.Property.Systemd.Core
- started :: ServiceName -> Property
- stopped :: ServiceName -> Property
- enabled :: ServiceName -> Property
- disabled :: ServiceName -> Property
- persistentJournal :: Property
- daemonReloaded :: Property
- data Container
- container :: MachineName -> (FilePath -> Chroot) -> Container
- nspawned :: Container -> RevertableProperty
- containerCfg :: String -> RevertableProperty
- resolvConfed :: RevertableProperty
Documentation
persistentJournal :: Property Source
Enables persistent storage of the journal.
daemonReloaded :: Property Source
Causes systemd to reload its configuration files.
container :: MachineName -> (FilePath -> Chroot) -> Container Source
Defines a container with a given machine name.
Properties can be added to configure the Container.
container "webserver" (Chroot.debootstrapped (System (Debian Unstable) "amd64") mempty) & Apt.installedRunning "apache2" & ...
nspawned :: Container -> RevertableProperty Source
Runs a container using systemd-nspawn.
A systemd unit is set up for the container, so it will automatically be started on boot.
Systemd is automatically installed inside the container, and will communicate with the host's systemd. This allows systemctl to be used to examine the status of services running inside the container.
When the host system has persistentJournal enabled, journactl can be used to examine logs forwarded from the container.
Reverting this property stops the container, removes the systemd unit, and deletes the chroot and all its contents.
containerCfg :: String -> RevertableProperty Source
This configures how systemd-nspawn(1) starts the container, by specifying a parameter, such as "--private-network", or "--link-journal=guest"
When there is no leading dash, "--" is prepended to the parameter.
Reverting the property will remove a parameter, if it's present.
resolvConfed :: RevertableProperty Source
Bind mounts /etc/resolv.conf from the host into the container.
This property is enabled by default. Revert it to disable it.