From 4f6edf8f5e0dcd85efb23dc5f0fdef7994bdee0a Mon Sep 17 00:00:00 2001 From: craige@a46118dff5bc0fad85259759970d8b4b9fc377d7 Date: Thu, 26 Jan 2017 06:10:07 +0000 Subject: --- doc/forum/Inherited_Variables....mdwn | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 doc/forum/Inherited_Variables....mdwn diff --git a/doc/forum/Inherited_Variables....mdwn b/doc/forum/Inherited_Variables....mdwn new file mode 100644 index 00000000..1535ec77 --- /dev/null +++ b/doc/forum/Inherited_Variables....mdwn @@ -0,0 +1,26 @@ +I've got a server defined in config.hs as follows: + + myserver :: Host + myserver = host "myserver.mydomain" $ props + & standardSystem (Stable "jessie") X86_64 [ "Welcome to myserver!" ] + +I'm writing a module (to deploy Matrix, FWIW) which has a section like this: + + sources :: Property Debian + sources = File.hasContent "/etc/apt/sources.list.d/matrix.list" + [ "# Deployed by Propellor" + , "" + , "deb http://matrix.org/packages/debian/ jessie main" + ] `onChange` Apt.update + +What I would like to be able to do, for example, is pull "jessie" from the standardSystem line into the sources function. + +The host name is another I'd like to be able to pull in, so that I can abstract as much as possible and wind up with a line that looks not unlike this: + + & Matrix.server + +Instead of + + & Matrix.server hostname jessie + +Am I barking up the wrong tree and should I just embrace the latter? -- cgit v1.2.3