module Propellor.Property.HostingProvider.Linode where
import Propellor.Base
import qualified Propellor.Property.Grub as Grub
import qualified Propellor.Property.File as File
serialGrub :: Property (HasInfo + DebianLike)
serialGrub :: Property
(HasInfo
+ MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
serialGrub = String
"/etc/default/grub" String -> [String] -> Property UnixLike
`File.containsLines`
[ String
"GRUB_CMDLINE_LINUX=\"console=ttyS0,19200n8\""
, String
"GRUB_DISABLE_LINUX_UUID=true"
, String
"GRUB_SERIAL_COMMAND=\"serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1\""
, String
"GRUB_TERMINAL=serial"
]
Property UnixLike
-> Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> CombinedType
(Property UnixLike)
(Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
forall x y. Combines x y => x -> y -> CombinedType x y
`onChange` Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
Grub.mkConfig
Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> Property
(MetaTypes
'[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> CombinedType
(Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
(Property
(MetaTypes
'[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
forall x y. Combines x y => x -> y -> CombinedType x y
`requires` GrubTarget
-> Property
(HasInfo
+ MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
Grub.installed GrubTarget
Grub.PC
Property
(MetaTypes
'[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
-> String
-> Property
(MetaTypes
'[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
forall p. IsProp p => p -> String -> p
`describe` String
"GRUB configured for Linode serial console"
chainPVGrub :: Grub.TimeoutSecs -> Property (HasInfo + DebianLike)
chainPVGrub :: TimeoutSecs
-> Property
(HasInfo
+ MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
chainPVGrub = String
-> String
-> TimeoutSecs
-> Property
(HasInfo
+ MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
Grub.chainPVGrub String
"hd0" String
"xen/xvda"
mlocateEnabled :: Property DebianLike
mlocateEnabled :: Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
mlocateEnabled = Property UnixLike
-> Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
forall (p :: * -> *) (untightened :: [MetaType])
(tightened :: [MetaType]).
(TightenTargets p, TightenTargetsAllowed untightened tightened,
SingI tightened) =>
p (MetaTypes untightened) -> p (MetaTypes tightened)
tightenTargets (Property UnixLike
-> Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
-> Property UnixLike
-> Property
(MetaTypes '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
forall a b. (a -> b) -> a -> b
$
String
"/etc/cron.daily/mlocate"
String -> FileMode -> Property UnixLike
`File.mode` [FileMode] -> FileMode
combineModes ([FileMode]
readModes [FileMode] -> [FileMode] -> [FileMode]
forall a. [a] -> [a] -> [a]
++ [FileMode]
executeModes)