summaryrefslogtreecommitdiff
path: root/config-simple.hs
AgeCommit message (Collapse)Author
2016-03-28type safe targets for propertiesJoey Hess
* Property types have been improved to indicate what systems they target. This prevents using eg, Property FreeBSD on a Debian system. Transition guide for this sweeping API change: - Change "host name & foo & bar" to "host name $ props & foo & bar" - Similarly, `propertyList` and `combineProperties` need `props` to be used to combine together properties; they no longer accept lists of properties. (If you have such a list, use `toProps`.) - And similarly, Chroot, Docker, and Systemd container need `props` to be used to combine together the properies used inside them. - The `os` property is removed. Instead use `osDebian`, `osBuntish`, or `osFreeBSD`. These tell the type checker the target OS of a host. - Change "Property NoInfo" to "Property UnixLike" - Change "Property HasInfo" to "Property (HasInfo + UnixLike)" - Change "RevertableProperty NoInfo" to "RevertableProperty UnixLike UnixLike" - Change "RevertableProperty HasInfo" to "RevertableProperty (HasInfo + UnixLike) UnixLike" - GHC needs {-# LANGUAGE TypeOperators #-} to use these fancy types. This is enabled by default for all modules in propellor.cabal. But if you are using propellor as a library, you may need to enable it manually. - If you know a property only works on a particular OS, like Debian or FreeBSD, use that instead of "UnixLike". For example: "Property Debian" - It's also possible make a property support a set of OS's, for example: "Property (Debian + FreeBSD)" - Removed `infoProperty` and `simpleProperty` constructors, instead use `property` to construct a Property. - Due to the polymorphic type returned by `property`, additional type signatures tend to be needed when using it. For example, this will fail to type check, because the type checker cannot guess what type you intend the intermediate property "go" to have: foo :: Property UnixLike foo = go `requires` bar where go = property "foo" (return NoChange) To fix, specify the type of go: go :: Property UnixLike - `ensureProperty` now needs to be passed a witness to the type of the property it's used in. change this: foo = property desc $ ... ensureProperty bar to this: foo = property' desc $ \w -> ... ensureProperty w bar - General purpose properties like cmdProperty have type "Property UnixLike". When using that to run a command only available on Debian, you can tighten the type to only the OS that your more specific property works on. For example: upgraded :: Property Debian upgraded = tightenTargets (cmdProperty "apt-get" ["upgrade"]) - Several utility functions have been renamed: getInfo to fromInfo propertyInfo to getInfo propertyDesc to getDesc propertyChildren to getChildren * The new `pickOS` property combinator can be used to combine different properties, supporting different OS's, into one Property that chooses which to use based on the Host's OS. * Re-enabled -O0 in propellor.cabal to reign in ghc's memory use handling these complex new types. * Added dependency on concurrent-output; removed embedded copy.
2016-03-07split config-freebsd back outJoey Hess
Let's keep config-simple quite simple; naive users start by modifying it and probably don't want to be faced with freebsd example, unless they're freebsd users.
2016-03-07FreeBSD Support including:Evan Cofsky
- Propellor bootstrapping - Basic pkg - Basic ZFS datasets and properties - Simple Poudriere configuration (regular and ZFS) - Poudriere jail creation FIXME: - Cron.hs: runPropellor needs the System, but hasn't yet gotten it. Reorganizing: - Remove FreeBSD.Process - Move ZFS up to Property - Add Info for Pkg.update/Pkg.upgrade - Move FreeBSD.md to doc so it'll show up automatically. - Merge the FreeBSD config with the other sample config. - Use Info to check Pkg updated/upgraded and Poudriere configured. - Warnings clean-up, move ZFS types to Propellor.Types. - Maintainer and license statements.
2015-10-17typoFélix Sipma
2015-10-16switch config-simple.hs to use a hosts list and toplevel Host definitionsJoey Hess
This is how I do it in my own config.hs, and it's generally useful to have a hosts list, and toplevel Host definitions to pass to various properties. If you're getting a conflict from this in your own config.hs file, you can just ignore these changes..
2015-10-10tighten focus of Propellor module, adding Propellor.Base for all the exportsJoey Hess
2015-10-10propellor spinJoey Hess
2015-06-16Replace String type synonym Docker.Image by a data type which allows to ↵Antoine Eiche
specify an image name and an optional tag. This also introduces the class ImageIdentifier which is internally used by some Docker methods.
2015-04-22API change: Added User and Group newtypes, and Properties that used to use ↵Joey Hess
the type UserName = String were changed to use them. Note that UserName is kept and PrivData still uses it in its sum type. This is to avoid breaking PrivData serialization.
2015-04-19jessie is almost ready to be the new debian stable, update a few examplesJoey Hess
no behavior changes
2015-02-12update for cron changeJoey Hess
2014-12-06Reboot.atEndJoey Hess
2014-11-23hasSomePassword and hasPassword now default to using the name of the host as ↵Joey Hess
the Context for the password. To specify a different context, use hasSomePassword' and hasPassword' (API change)
2014-11-19separate docker container typeJoey Hess
Docker containers are now a separate data type, cannot be included in the main host list, and are instead passed to Docker.docked. (API change)
2014-10-10updateJoey Hess
2014-08-19merge from masterJoey Hess
2014-06-05update for stdSourcesList changeJoey Hess
2014-04-19cleanupJoey Hess
2014-04-19newbie docsJoey Hess
2014-04-10propellor spinJoey Hess
2014-04-10use HostAttr to simplify config fileJoey Hess
2014-04-09propellor spinJoey Hess
2014-04-08serviceInstalledRunningJoey Hess
2014-04-04nopeJoey Hess
2014-04-04updateJoey Hess
2014-04-03reorg configsJoey Hess