| Age | Commit message (Collapse) | Author |
|
could use zoneFileString for other things eg SSHFP. I have not yet,
because AFAICS, SSHFP already splits the key up in a different way and
while using zoneFileString should be ok, I'd need to test it..
|
|
The TXT record's string is split into strings of length <= 255
characters and these strings are enclosed inside a pair of
parentheses.
Signed-off-by: rsiddharth <s@ricketyspace.net>
|
|
* When the ipv4 and ipv6 properties are used with a container, avoid
propagating the address out to the host.
* DnsInfo has been replaced with DnsInfoPropagated and
DnsInfoUnpropagated. (API change)
* Code that used fromDnsInfo . fromInfo changes to use getDnsInfo.
* addDNS takes an additional Bool parameter to control whether
the DNS info should propagate out of containers. (API change)
This commit was sponsored by Trenton Cronholm on Patreon.
|
|
|
|
|
|
|
|
Renamed several utility functions along the way.
|
|
|
|
RevertableProperty used to be assumed to contain info, but this is now made
explicit, with RevertableProperty HasInfo or RevertableProperty NoInfo.
Transition guide:
- If you define a RevertableProperty, expect some type check
failures like: "Expecting one more argument to ‘RevertableProperty’".
- Change it to "RevertableProperty NoInfo"
- The compiler will then tell you if it needs "HasInfo" instead.
- If you have code that uses the RevertableProperty constructor
that fails to type check, use the more powerful <!> operator
|
|
* Various property combinators that combined a RevertableProperty
with a non-revertable property used to yield a RevertableProperty.
This was a bug, because the combined property could not be fully
reverted in many cases. Fixed by making the combined property
instead be a Property HasInfo.
* combineWith now takes an addional parameter to control how revert
actions are combined (API change).
|
|
* Ssh.keyImported is replaced with Ssh.userKeys. (API change)
The new property only gets the private key from the privdata; the
public key is provided as a parameter, and so is available as
Info that other properties can use.
* Ssh.keyImported' is renamed to Ssh.userKeyAt, and also changed
to only import the private key from the privdata. (API change)
* While Ssh.keyImported and Ssh.keyImported' avoided updating existing
keys, the new Ssh.userKeys and Ssh.userKeyAt properties will
always update out of date key files.
* Ssh.pubKey renamed to Ssh.hostPubKey. (API change)
This makes eg, setting up ssh for spin controllers work better.
|
|
|
|
|
|
- add canonicalIP and reverseIP to Propellor.Types.Dns
- remove corresponding canonical and revIP from Propellor.Property.Unbound
- Propellor.Property.Dns: convert rValue, rField and genRecord to return
Maybe String
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
|
|
|
|
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.
|
|
* 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.
|
|
Not yet used
|
|
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.
|
|
|
|
|
|
|
|
|
|
SSHFP records.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
This happens when a docker host has an alias defined, because all docker
hosts are added to the dns, same as other hosts.
|
|
|
|
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.
|
|
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.
|
|
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.
|