summaryrefslogtreecommitdiff
path: root/doc/forum/Inherited_Variables....mdwn
diff options
context:
space:
mode:
authorJoey Hess2017-02-15 15:22:13 -0400
committerJoey Hess2017-02-15 15:22:13 -0400
commit4f29d576115d1bcbed60eacb3642523f1b5f480f (patch)
treecb4b5ada932bbdea7c4ee97008fc871cd810b543 /doc/forum/Inherited_Variables....mdwn
parent6e3192f0d2e063f07d7a5d2b96648e9167cc576a (diff)
parentb29bab35747e6345a4818e5a77c53d029562e3c3 (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'doc/forum/Inherited_Variables....mdwn')
-rw-r--r--doc/forum/Inherited_Variables....mdwn26
1 files changed, 26 insertions, 0 deletions
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?