summaryrefslogtreecommitdiffstats
path: root/deploy/README.templater
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-08-02 09:19:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-02 09:19:44 +0000
commit2c8231be1aebe869297aa5ca15870da70338bd68 (patch)
tree7a3b7b55f1243fa049dbe398c5e412a46c2fa002 /deploy/README.templater
parentef0d47da19062f1fd5574fdb97409c290798f800 (diff)
parent8687c10b1a098c9c9f41e68c7f322a5ce6727c40 (diff)
Merge "Make it possible to include files in templates"
Diffstat (limited to 'deploy/README.templater')
-rw-r--r--deploy/README.templater94
1 files changed, 94 insertions, 0 deletions
diff --git a/deploy/README.templater b/deploy/README.templater
index 964872fb7..b5d52ab9d 100644
--- a/deploy/README.templater
+++ b/deploy/README.templater
@@ -49,6 +49,12 @@ syntax is described below:
Specify a network type and a role as arguments to interface().
+5. File inclusion
+
+ %{include(templates/interfaces.yaml)}
+
+ Filename with absolute or relative path.
+
======== EXAMPLES ========
@@ -275,3 +281,91 @@ compute_private_if: ens5
mongo_mgmt_if: ens3
controller_private_if: ens4
+
+--- Example 4 ---
+
+Template file:
+
+version: 1.1
+created: Mon Jun 13 19:39:35 2016
+comment: None
+%{include(environment.yaml)}
+
+
+environment.yaml:
+
+environment:
+ name: F9-NOSDN-NOFEATURE-VXLAN-BAREMETAL
+ net_segment_type: tun
+
+
+Result:
+
+version: 1.1
+created: Mon Jun 13 19:39:35 2016
+comment: None
+environment:
+ name: F9-NOSDN-NOFEATURE-VXLAN-BAREMETAL
+ net_segment_type: tun
+
+
+--- Example 5 ---
+
+Template file (except):
+
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+# ...
+# lines omitted for brevity
+ %{include(templates/cgroups.yaml)}
+
+
+cgroups.yaml:
+
+ cgroups:
+ metadata:
+ always_editable: true
+ group: general
+ label: Cgroups conguration for services
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 90
+
+
+Result:
+
+settings:
+ editable:
+ access:
+ email:
+ description: Email address for Administrator
+ label: Email
+ regex:
+ error: Invalid email
+ source: ^\S+@\S+$
+ type: text
+ value: admin@localhost
+ weight: 40
+# ...
+# again, lines omitted for brevity
+ cgroups:
+ metadata:
+ always_editable: true
+ group: general
+ label: Cgroups conguration for services
+ restrictions:
+ - action: hide
+ condition: 'true'
+ weight: 90
+