summaryrefslogtreecommitdiff
path: root/src/Propellor/Property.hs
AgeCommit message (Collapse)Author
2015-10-10propellor spinJoey Hess
2015-10-10tighten focus of Propellor module, adding Propellor.Base for all the exportsJoey Hess
2015-10-10Improved documentation, particularly of the Propellor module.Joey Hess
This involved some code changes, including some renaming of instance methods. (ABI change)
2015-09-13Follow some hlint suggestions.Mario Lang
2015-07-21languageJoey Hess
2015-07-21fix layout to meet styleJoey Hess
2015-07-21remove caution commentJoey Hess
I think this was inherited from flagFile, but the reasons to use caution when using flagFile (that it makes code to satisfy a property only run once) don't apply when using onChangeFlagOnFail.
2015-07-21Add operator onChangeFlagOnFail.Antoine Eiche
It seems like `onChange` except that if property y fails, a flag file is generated. On next runs, if the flag file is present, property y is executed even if property x doesn't change. With `onChange`, if y fails, the property x `onChange` y returns `FailedChange`. But if this property is applied again, it returns `NoChange`. This behavior can cause trouble...
2015-01-25improve docsJoey Hess
2015-01-24fix typoJoey Hess
2015-01-24GADT properties seem to work (untested)Joey Hess
* Property has been converted to a GADT, and will be Property NoInfo or Property HasInfo. This was done to make sure that ensureProperty is only used on properties that do not have Info. Transition guide: - Change all "Property" to "Property NoInfo" or "Property WithInfo" (The compiler can tell you if you got it wrong!) - To construct a RevertableProperty, it is useful to use the new (<!>) operator - Constructing a list of properties can be problimatic, since Property NoInto and Property WithInfo are different types and cannot appear in the same list. To deal with this, "props" has been added, and can built up a list of properties of different types, using the same (&) and (!) operators that are used to build up a host's properties.
2015-01-24added GADT to determine between a property with info and withoutJoey Hess
Not yet used
2015-01-19Fix info propigation from fallback combinator's second Property.Joey Hess
2015-01-18Property treeJoey Hess
Properties now form a tree, instead of the flat list used before. This simplifies propigation of Info from the Properties used inside a container to the outer host; the Property that docks the container on the host can just have as child properties all the inner Properties, and their Info can then be gathered recursively. (Although in practice it still needs to be filtered, since not all Info should propigate out of a container.) Note that there is no change to how Properties are actually satisfied. Just because a Property lists some child properties, this does not mean they always have their propertySatisfy actions run. It's still up to the parent property to run those actions. That's necessary so that a container's properties can be satisfied inside it, not outside. It also allows property combinators to add the combined Properties to their childProperties list, even if, like onChange, they don't always run the child properties at all. Testing: I tested that the exact same Info is calculated before and after this change, for every Host in my config file.
2015-01-04DNS WIPJoey Hess
2014-12-08propellor spinJoey Hess
(cherry picked from commit 1d02d589c79781cc4b0bd82467edbdf64c40f34d)
2014-12-06Reboot.atEndJoey Hess
2014-12-06endAction can be used to register an action to run once propellor has ↵Joey Hess
successfully run on a host.
2014-11-20incomplete systemd container supportJoey Hess
2014-11-20starting work on a Chroot moduleJoey Hess
factored out info up-propigation code rom Docker
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-11-19Added support for using debootstrap from propellor.Joey Hess
Most of the hard part was making it be able to install debootstrap from source, for use on non-debian-derived systems.
2014-11-19add fallback combinatorJoey Hess
2014-10-23Revert "Revert "Revert "propellor spin"""Joey Hess
This reverts commit 26bef2486d27b2cde6feda633c6a7509675a3fe5.
2014-10-23Revert "Revert "propellor spin""Joey Hess
This reverts commit 8d353813bf1e4d0c64f33cf2beed0938eeca92b4.
2014-10-23Revert "propellor spin"Joey Hess
This reverts commit ac7b182b5a0f3711414757d05bb461385516e700.
2014-10-23propellor spinJoey Hess
2014-10-23Revert "propellor spin"Joey Hess
This reverts commit 80f5b53f1b7fdc876d5e45df68c29f53bd9666b2.
2014-10-23propellor spinJoey Hess
2014-10-23Revert "propellor spin"Joey Hess
This reverts commit 7637ea0af9ff4056cbdc16f25016785442d4b97e.
2014-10-23propellor spinJoey Hess
2014-10-23propellor spinJoey Hess
2014-10-23bugfixJoey Hess
2014-10-08fix some accidental uses of spaces, rather than tabs, for indentationJoey Hess
2014-06-09Attr is renamed to Info.Joey Hess
2014-06-07combineProperties no longer stops when a property fails; now it continues ↵Joey Hess
trying to satisfy all properties on the list before propigating the failure. Audited all of my calls to combineProperties and they should be fine with this behavior.. which suggests it's the right behavior.
2014-06-07when ssh key data is missing, allow both error messages to be printedJoey Hess
2014-05-31got rid of the Attr -> Attr SetAttr hack, and use monoids for AttrJoey Hess
The SetAttr hack used to be needed because the hostname was part of the Attr, and was required to be present. Now that it's moved to Host, let's get rid of that, since it tended to waste CPU.
2014-05-31remove now redundant _hostname field of AttrJoey Hess
Now that Host includes _hostName, it's redundant to also keep it in Attr. This requires changing the reader monad to operate on the whole Host.
2014-05-31propellor spinJoey Hess
2014-05-28propellor spinJoey Hess
2014-05-14moved source code to srcJoey Hess
This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work.