Commit Graph

35 Commits

Author SHA1 Message Date
Joey Hess 603e6d3406 split out types to improve haddock for Propellor.Types 2015-01-19 15:09:03 -04:00
Joey Hess c7609c824b Add descriptions of how to set missing fields to --list-fields output. (Minor API changes) 2015-01-15 20:15:01 -04:00
Joey Hess 8e442f0656 DNS records for hosts with known ssh public keys now automatically include SSHFP records. 2015-01-04 19:24:18 -04:00
Joey Hess 93e89c7200 cleanup 2015-01-04 18:12:19 -04:00
Joey Hess 84685f24c9 Ssh.hostKeys now also installs any available SshEd25519 keys. 2015-01-04 15:59:54 -04:00
Joey Hess bb7b8e7891 add $INCLUDE of pubkeys before zone file is written, to avoid pogoing 2015-01-04 14:22:44 -04:00
Joey Hess f36443755e
propellor spin 2015-01-04 14:05:42 -04:00
Joey Hess d6c8ddb955 resign zone if keys change 2015-01-04 13:13:06 -04:00
Joey Hess 8172f243d7 DNS WIP 2015-01-04 12:44:05 -04:00
Joey Hess 05004730c7 add DnsSec privdata types 2015-01-03 19:08:32 -04:00
Joey Hess 23399416f1 broke up big function to describe PrivDataField 2014-12-14 16:14:05 -04:00
Joey Hess 71723ca09f support for crypted passwords in privdata
* 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-14 15:24:10 -04:00
Joey Hess 42a0c83248 Display a warning when ensureProperty is used on a property which has Info and is so prevented from propigating it.
Would much rather a type-based fixed, but this is all I have for now.
2014-12-07 17:09:55 -04:00
Joey Hess 2fe0b28982 more uses for hostContext 2014-12-07 15:21:55 -04:00
Joey Hess 9ca332e481 Fixed privdata introspection for User.hasPassword and User.hasSomePassword
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-12-07 15:03:06 -04:00
Joey Hess c97dd0d708 spelling typo 2014-12-05 19:33:34 -04:00
Joey Hess 9a8fcf80bb Hostname parameters not containing dots are looked up in the DNS to find the full hostname. 2014-11-22 19:58:35 -04:00
Joey Hess 6cdd37d9ff
propellor spin 2014-11-21 20:53:38 -04:00
Joey Hess b373ffb761 allow disabling nspawn params, and default to bind mounting /etc/resolv.conf 2014-11-21 20:32:32 -04:00
Joey Hess 6be49197f6 allow configuring systemd-nspawn parameters 2014-11-21 20:09:33 -04:00
Joey Hess 6c92f1034f split out info types 2014-11-21 18:55:33 -04:00
Joey Hess 5e4c57652c fix docker container provisioning
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-20 00:21:40 -04:00
Joey Hess d49d251897 separate docker container type
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-19 23:11:34 -04:00
Joey Hess 79ee61d958 stable suite changes
* Avoid encoding the current stable suite in propellor's code,
  since that poses a difficult transition around the release,
  and can easily be wrong if an older version of propellor is used.
  Instead, the os property for a stable system includes the suite name
  to use, eg Stable "wheezy".
* stdSourcesList uses the stable suite name, to avoid unwanted
  immediate upgrades to the next stable release.
2014-10-10 11:27:54 -04:00
Joey Hess ecc275cfeb
propellor spin 2014-07-23 12:23:44 -04:00
Joey Hess 58f79c12aa
propellor spin 2014-07-06 15:56:56 -04:00
Joey Hess fc49d75e4f Attr is renamed to Info. 2014-06-09 01:47:11 -04:00
Joey Hess 0f4e219838 can now derive Show for Attr 2014-06-05 17:07:02 -04:00
Joey Hess cae7e15f56 split out DockerAttr 2014-05-31 22:00:11 -04:00
Joey Hess d1aaf06f1c reorder for consistency
Onrder does not matter for mappend on set
2014-05-31 21:19:07 -04:00
Joey Hess 7c4b153739 simplify monoid instance with some helper types 2014-05-31 21:18:36 -04:00
Joey Hess d1eafb1277 correct order (didn't really cause any breakage) 2014-05-31 21:08:50 -04:00
Joey Hess 4f70fceb3a got rid of the Attr -> Attr SetAttr hack, and use monoids for Attr
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-31 20:43:23 -04:00
Joey Hess 5fc4b00651 remove now redundant _hostname field of Attr
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-31 18:04:41 -04:00
Joey Hess 7115d1ec16 moved source code to src
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.
2014-05-14 19:41:05 -04:00