Add new attribute "include" to "file"

This attribute have 3 values:
- "no": it's a normal file
- "name": the name is included in another template so it is generated before other templates
- "content": the content is included in another template so it is generated before the other templates and is not installed on the server

fixes #2
This commit is contained in:
2021-02-21 10:34:01 +01:00
parent 710711b253
commit 0be7a72d28
101 changed files with 631 additions and 377 deletions

View File

@ -1 +1 @@
{"rougail.general.condition": "oui", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.mode": "0644", "services.test.files.file1.name": "/tmp/file1", "services.test.files.file1.owner": "root", "services.test.files.file1.source": "file1", "services.test.files.file1.activate": false}
{"rougail.general.condition": "oui", "services.test.files.file1.engine": "creole", "services.test.files.file1.group": "root", "services.test.files.file1.include": "no", "services.test.files.file1.mode": "0644", "services.test.files.file1.name": "/tmp/file1", "services.test.files.file1.owner": "root", "services.test.files.file1.source": "file1", "services.test.files.file1.activate": false}

View File

@ -18,12 +18,13 @@ option_2 = OptionDescription(name="general", doc="general", children=[option_3,
option_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2])
option_10 = StrOption(name="engine", doc="engine", default="creole")
option_11 = StrOption(name="group", doc="group", default="root")
option_12 = StrOption(name="mode", doc="mode", default="0644")
option_13 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_14 = StrOption(name="owner", doc="owner", default="root")
option_15 = StrOption(name="source", doc="source", default="file1")
option_16 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")})))
option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16])
option_12 = StrOption(name="include", doc="include", default="no")
option_13 = StrOption(name="mode", doc="mode", default="0644")
option_14 = FilenameOption(name="name", doc="name", default="/tmp/file1")
option_15 = StrOption(name="owner", doc="owner", default="root")
option_16 = StrOption(name="source", doc="source", default="file1")
option_17 = BoolOption(name="activate", doc="activate", default=Calculation(func.calc_value, Params((ParamValue(False)), kwargs={'default': ParamValue(True), 'condition_0': ParamOption(option_3), 'expected_0': ParamValue(["oui", "maybe"]), 'condition_operator': ParamValue("OR")})))
option_9 = OptionDescription(name="file1", doc="file1", children=[option_10, option_11, option_12, option_13, option_14, option_15, option_16, option_17])
option_8 = OptionDescription(name="files", doc="files", children=[option_9])
option_7 = OptionDescription(name="test", doc="test", children=[option_8])
option_6 = OptionDescription(name="services", doc="services", children=[option_7], properties=frozenset({"hidden"}))