summaryrefslogtreecommitdiff
path: root/src/Propellor/Property
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property')
-rw-r--r--src/Propellor/Property/Chroot.hs6
-rw-r--r--src/Propellor/Property/Docker.hs6
-rw-r--r--src/Propellor/Property/Systemd.hs8
3 files changed, 10 insertions, 10 deletions
diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs
index de99e6c4..395ec74c 100644
--- a/src/Propellor/Property/Chroot.hs
+++ b/src/Propellor/Property/Chroot.hs
@@ -28,10 +28,10 @@ data BuilderConf
= UsingDeboostrap Debootstrap.DebootstrapConfig
deriving (Show)
-instance Hostlike Chroot where
+instance PropAccum Chroot where
(Chroot l s c h) & p = Chroot l s c (h & p)
(Chroot l s c h) &^ p = Chroot l s c (h &^ p)
- getHost (Chroot _ _ _ h) = h
+ getProperties (Chroot _ _ _ h) = hostProperties h
-- | Defines a Chroot at the given location, built with debootstrap.
--
@@ -76,7 +76,7 @@ provisioned' propigator c@(Chroot loc system builderconf _) systemdonly = Revert
teardown = toProp (revert built)
propigateChrootInfo :: Chroot -> Property -> Property
-propigateChrootInfo c p = propigateHostLike c p'
+propigateChrootInfo c p = propigateContainer c p'
where
p' = p { propertyInfo = propertyInfo p <> chrootInfo c }
diff --git a/src/Propellor/Property/Docker.hs b/src/Propellor/Property/Docker.hs
index 3e2fbaf3..e65d6bb7 100644
--- a/src/Propellor/Property/Docker.hs
+++ b/src/Propellor/Property/Docker.hs
@@ -77,10 +77,10 @@ type ContainerName = String
-- | A docker container.
data Container = Container Image Host
-instance Hostlike Container where
+instance PropAccum Container where
(Container i h) & p = Container i (h & p)
(Container i h) &^ p = Container i (h &^ p)
- getHost (Container _ h) = h
+ getProperties (Container _ h) = hostProperties h
-- | Defines a Container with a given name, image, and properties.
-- Properties can be added to configure the Container.
@@ -134,7 +134,7 @@ docked ctr@(Container _ h) = RevertableProperty
]
propigateContainerInfo :: Container -> Property -> Property
-propigateContainerInfo ctr@(Container _ h) p = propigateHostLike ctr p'
+propigateContainerInfo ctr@(Container _ h) p = propigateContainer ctr p'
where
p' = p { propertyInfo = propertyInfo p <> dockerinfo }
dockerinfo = dockerInfo $
diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs
index e80c32be..7fe600a0 100644
--- a/src/Propellor/Property/Systemd.hs
+++ b/src/Propellor/Property/Systemd.hs
@@ -33,10 +33,10 @@ type MachineName = String
data Container = Container MachineName Chroot.Chroot Host
deriving (Show)
-instance Hostlike Container where
- (Container n c h) & p = Container n c (h & p)
- (Container n c h) &^ p = Container n c (h &^ p)
- getHost (Container _ _ h) = h
+instance PropAccum Container where
+ (Container n c h) & p = Container n c (h & p)
+ (Container n c h) &^ p = Container n c (h &^ p)
+ getProperties (Container _ _ h) = hostProperties h
-- | Starts a systemd service.
started :: ServiceName -> Property