summaryrefslogtreecommitdiff
path: root/src/Propellor/PrivData.hs
AgeCommit message (Collapse)Author
2018-04-23semigroup monoid change fallout; drop ghc 7 supportJoey Hess
Fix build with ghc 8.4, which broke due to the Semigroup Monoid change. See https://prime.haskell.org/wiki/Libraries/Proposals/SemigroupMonoid Dropped support for building propellor with ghc 7 (as in debian oldstable), to avoid needing to depend on the semigroups transitional package, but also because it's just too old to be worth supporting. If we indeed drop ghc 7 support entirely, some code to support "jessie" can be removed; concurrent-output can be de-embedded, and the Singletons code can be simplified. This commit was sponsored by Jack Hill on Patreon.
2017-03-11don't propagate DNS info from DiskImage chrootsJoey Hess
* DiskImage building properties used to propagate DNS info out from the chroot used to build the disk image to the Host. That is no longer done, since that chroot only exists as a side effect of the disk image creation and servers will not be running in it. * The IsInfo types class's propagateInfo function changed to use a PropagateInfo data type. (API change) This is particularly important when using hostChroot, since the host could well have DNS settings then. This commit was sponsored by Ole-Morten Duesund on Patreon.
2016-12-24GHC's fileSystemEncoding is used for all String IO, to avoid ↵Joey Hess
encoding-related crashes in eg, Propellor.Property.File.
2016-04-28Fix build with directory-1.2.6.2.Joey Hess
It's now exporting a conflicting isSymbolicLink https://github.com/haskell/directory/issues/52 Only a few places in propellor use isSymbolicLink, but to prevent future problems, made as much of it as possible import Utility.Directory, which re-exports System.Directory without the conflicting symbol. (Utility.Tmp and System.Console.Concurrent.Internal cannot import Utility.Directory due to cycles, and don't use isSymbolicLink anyway.)
2016-03-27improve haddocks and move code around to make them more clearJoey Hess
2016-03-26ported propagateContainerJoey Hess
Renamed several utility functions along the way.
2016-03-26got rid of the undefined in privdataJoey Hess
addInfoProperty' is like addInfoProperty but for when the input property is already known to HasInfo.
2016-03-25ported Property.ListJoey Hess
I wanted to keep propertyList [foo, bar] working, but had some difficulty making the type class approach work. Anyway, that's unlikely to be useful, since foo and bar probably have different types, or could easiy have their types updated breaking it.
2016-03-25fix warningsJoey Hess
2016-03-24converted PrivDataJoey Hess
Somewhat poorly; I don't like needing to export the Property constructor to use it here, and there's a use of undefined where it should be able to use sing. I got quite stuck on this, so am happy to have anything that works.
2016-03-07privdata/relocateJoey Hess
better than symlinks because this way no conflict can ever occur and, commit from hook
2016-03-06Force ssh, scp, and git commands to be run in the foreground.Joey Hess
Before, they could run in the background if another process was running, and so their output wouldn't immediately be visible. With this change, the concurrent-output layer is not used for these interactive commands.
2015-12-19Clean build with ghc 7.10.Joey Hess
Import Prelude after modules that cause warnings due to AMP change
2015-11-01merge from concurrent-outputJoey Hess
2015-11-01run editor processes in foregroundJoey Hess
2015-10-27make Propellor.Message use lock to handle concurrent threads outputting messagesJoey Hess
Not yet handled: Output from concurrent programs.
2015-10-20refactorJoey Hess
2015-10-20privdata propigation for Spin.controllerJoey Hess
Controlling host inherits the privdata for the host it spins, and sends it along to that host.
2015-10-18fix typo: propigate → propagateFelix Gruber
2015-10-16Added --unset-unusedJoey Hess
2015-09-30change HostContext for containersJoey Hess
Privdata that uses HostContext inside a container will now have the name of the container as its context, rather than the name of the host(s) where the container is used. This allows eg, having different passwords for a user in different containers. Note that previously, propellor would prompt using the container name as the context, but not actually use privdata using that context; so this is a bug fix. I don't entirely like the implementation; I had to put the code to change the context in PropAccum, and it's not generalized past PrivInfo.
2015-09-20fix example after recent changesJoey Hess
2015-09-14Allow storing arbitrary ByteStrings in PrivData, extracted using ↵Joey Hess
privDataByteString.
2015-09-14clean up privdata excess/lacking newline issueJoey Hess
* PrivData converted to newtype (API change). * Stopped stripping trailing newlines when setting PrivData; this was previously done to avoid mistakes when pasting eg passwords with an unwanted newline. Instead, PrivData consumers should use either privDataLines or privDataVal, to extract respectively lines or a value (without internal newlines) from PrivData.
2015-09-13Follow some hlint suggestions.Mario Lang
2015-09-06Added Propellor.Property.Rsync. WIP; untestedJoey Hess
Convert Info to use Data.Dynamic, so properties can export and consume info of any type that is Typeable and a Monoid, including data types private to a module. (API change) Thanks to Joachim Breitner for the idea.
2015-06-29Added --unset to delete a privdata field.Joey 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-19clean up exportsJoey Hess
2015-01-15Add descriptions of how to set missing fields to --list-fields output. ↵Joey Hess
(Minor API changes)
2015-01-08make both lines pastable togetherJoey Hess
2015-01-04sshPubKey is renamed to Ssh.pubKey, and has an added SshKeyType parameter.Joey Hess
2014-12-14broke up big function to describe PrivDataFieldJoey Hess
2014-12-14support for crypted passwords in privdataJoey Hess
* Added CryptPassword to PrivDataField, for password hashes as produced by crypt(3). * User.hasPassword and User.hasSomePassword will now use either a CryptPassword or a Password from privdata, depending on which is set.
2014-12-07Fixed privdata introspection for User.hasPassword and User.hasSomePasswordJoey Hess
This is not a complete fix for the problem that Info doen't propigate from the called property when code does something like: do hostname <- asks hostName ensureProperty $ foo hostname Instead, I just eliminated the need to implement hasPassword that way, by making the PrivData Info use a HostContext which automatically gets the right hostname passed to it. All other uses of withPrivData don't have the problem. It's still possible for the user to run into the problem if they write something like the above, where foo is a property that uses privdata. However, all properties that take a Context now also accept a HostContext, so it's at least less likely the user needs to write that.
2014-11-20fix docker container provisioningJoey Hess
Since the containers are no longer on the host list, they were not found while provisioning, oops. To fix, had to add to a host's info a map of the containers docked to it. Unfortunately, that required Propellor.Types.Info be glommed into Propellor.Types, since it needed to refer to Host.
2014-11-11propellor spinJoey Hess
2014-10-08fix some accidental uses of spaces, rather than tabs, for indentationJoey Hess
2014-07-07propellor spinJoey Hess
2014-07-06reorgJoey Hess
2014-07-06propigate required privdata fields out from docker containers to the hosts ↵Joey Hess
they're docked in
2014-07-06propellor spinJoey Hess
2014-07-06move privdata Property to toplevel so its Info propigatesJoey Hess
Ugh, that's a nasty gotcha but I cannot see a way to fix it generally right now.
2014-07-06beautiful table for --list-fields, with the hostnamesJoey Hess
2014-07-06propellor spinJoey Hess
2014-07-06better output, after gpg messagesJoey Hess
2014-07-06propellor spinJoey Hess
2014-06-19Add --list-fields to list a host's currently set privdata fields.Joey Hess
2014-06-19Add --edit to edit a privdata value in $EDITORJoey Hess