<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Metaconfig</id>
	<title>Metaconfig - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://t2bwiki.iihe.ac.be/index.php?action=history&amp;feed=atom&amp;title=Metaconfig"/>
	<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Metaconfig&amp;action=history"/>
	<updated>2026-04-20T09:47:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=Metaconfig&amp;diff=886&amp;oldid=prev</id>
		<title>Rougny Romain rrougny@ua.ac.be at 13:30, 20 September 2017</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Metaconfig&amp;diff=886&amp;oldid=prev"/>
		<updated>2017-09-20T13:30:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:30, 20 September 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;};&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;};&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Configure a INI-like file with metaconfig: example ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Configure a INI-like file with metaconfig: example ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A pan template like this (&amp;#039;&amp;#039;&amp;#039;sites/iihe-production/config/fail2ban/ssh.pan&amp;#039;&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A pan template like this (&amp;#039;&amp;#039;&amp;#039;sites/iihe-production/config/fail2ban/ssh.pan&amp;#039;&amp;#039;&amp;#039;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l87&quot;&gt;Line 87:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 89:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;ssh-iptables/findtime&amp;#039; = &amp;#039;1800&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;ssh-iptables/findtime&amp;#039; = &amp;#039;1800&amp;#039;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;will give :&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;will give :&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rougny Romain rrougny@ua.ac.be</name></author>
	</entry>
	<entry>
		<id>https://t2bwiki.iihe.ac.be/index.php?title=Metaconfig&amp;diff=885&amp;oldid=prev</id>
		<title>Rougny Romain rrougny@ua.ac.be: Created page with &quot; === How to use ncm-metaconfig : complete example === The official documentation can be found [https://github.com/quattor/configuration-modules-core/blob/master/ncm-metaconfig...&quot;</title>
		<link rel="alternate" type="text/html" href="https://t2bwiki.iihe.ac.be/index.php?title=Metaconfig&amp;diff=885&amp;oldid=prev"/>
		<updated>2017-09-20T13:30:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; === How to use ncm-metaconfig : complete example === The official documentation can be found [https://github.com/quattor/configuration-modules-core/blob/master/ncm-metaconfig...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
=== How to use ncm-metaconfig : complete example ===&lt;br /&gt;
The official documentation can be found [https://github.com/quattor/configuration-modules-core/blob/master/ncm-metaconfig/src/main/perl/metaconfig.pod here].&lt;br /&gt;
&lt;br /&gt;
Here is an example ready to be included into a machine profile for test purposes :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# first, you need to deploy the tt file on the machine&lt;br /&gt;
# (the standard way is to include tt files in the the ncm-metaconfig rpm....)&lt;br /&gt;
variable CONTENTS = &amp;lt;&amp;lt;EOF;&lt;br /&gt;
name = {&lt;br /&gt;
[% FILTER indent -%]&lt;br /&gt;
hosts = [% hosts.join(&amp;#039;,&amp;#039;) %]&lt;br /&gt;
port = [% port %]&lt;br /&gt;
master = [% master ? &amp;quot;TRUE&amp;quot; : &amp;quot;FALSE&amp;quot; %]&lt;br /&gt;
description = &amp;quot;[% description %]&amp;quot;&lt;br /&gt;
[%     IF option.defined -%]&lt;br /&gt;
option = &amp;quot;[% option %]&amp;quot;&lt;br /&gt;
[%     END -%]&lt;br /&gt;
[% END -%]&lt;br /&gt;
}&lt;br /&gt;
EOF&lt;br /&gt;
&amp;#039;/software/components/filecopy/services&amp;#039; = npush(&lt;br /&gt;
	escape(&amp;#039;/usr/share/templates/quattor/metaconfig/example/main.tt&amp;#039;), nlist(&amp;#039;config&amp;#039;, CONTENTS, &amp;#039;perms&amp;#039;, &amp;#039;0644&amp;#039;)&lt;br /&gt;
);&lt;br /&gt;
&lt;br /&gt;
# below, the real metaconfig work&lt;br /&gt;
include &amp;#039;components/metaconfig/config&amp;#039;;&lt;br /&gt;
include &amp;#039;metaconfig/example/config&amp;#039;;&lt;br /&gt;
prefix &amp;#039;/software/components/metaconfig/services/{/etc/example/exampled.conf}/contents&amp;#039;;&lt;br /&gt;
&amp;#039;hosts&amp;#039; = list(&amp;#039;server1&amp;#039;, &amp;#039;server3&amp;#039;);&lt;br /&gt;
&amp;#039;port&amp;#039; = 800;&lt;br /&gt;
&amp;#039;master&amp;#039; = false;&lt;br /&gt;
&amp;#039;description&amp;#039; = &amp;#039;My example&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
# the tt file must be created before ncm-metaconfig runs&lt;br /&gt;
&amp;#039;/software/components/metaconfig/dependencies/pre&amp;#039; = push(&amp;#039;filecopy&amp;#039;);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this example to work, you need a directory metaconfig/example in your site, with the following content :&lt;br /&gt;
&lt;br /&gt;
* config.pan :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unique template metaconfig/example/config;&lt;br /&gt;
&lt;br /&gt;
include {&amp;#039;metaconfig/example/schema&amp;#039;};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bind &amp;quot;/software/components/metaconfig/services/{/etc/example/exampled.conf}/contents&amp;quot; = example_service;&lt;br /&gt;
&lt;br /&gt;
prefix &amp;quot;/software/components/metaconfig/services/{/etc/example/exampled.conf}&amp;quot;;&lt;br /&gt;
&amp;quot;daemon&amp;quot; = list(&amp;quot;exampled&amp;quot;);&lt;br /&gt;
&amp;quot;module&amp;quot; = &amp;quot;example/main&amp;quot;;&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* schema.pan :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
declaration template metaconfig/example/schema;&lt;br /&gt;
&lt;br /&gt;
include { &amp;#039;pan/types&amp;#039; };&lt;br /&gt;
&lt;br /&gt;
type example_service = {&lt;br /&gt;
    &amp;#039;hosts&amp;#039; :  type_hostname[]&lt;br /&gt;
    &amp;#039;port&amp;#039; : type_port&lt;br /&gt;
    &amp;#039;master&amp;#039; : boolean&lt;br /&gt;
    &amp;#039;description&amp;#039; : string&lt;br /&gt;
    &amp;#039;option&amp;#039; ? string&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure a INI-like file with metaconfig: example ===&lt;br /&gt;
&lt;br /&gt;
A pan template like this (&amp;#039;&amp;#039;&amp;#039;sites/iihe-production/config/fail2ban/ssh.pan&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
&amp;lt;pre&amp;gt;include &amp;#039;components/metaconfig/config&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
prefix &amp;#039;/software/components/metaconfig/services/{/etc/fail2ban/jail.d/ssh.conf}&amp;#039;;&lt;br /&gt;
&amp;#039;mode&amp;#039; = 0644;&lt;br /&gt;
&amp;#039;owner&amp;#039; = &amp;#039;root&amp;#039;;&lt;br /&gt;
&amp;#039;group&amp;#039; = &amp;#039;root&amp;#039;;&lt;br /&gt;
&amp;#039;module&amp;#039; = &amp;#039;tiny&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
prefix &amp;#039;/software/components/metaconfig/services/{/etc/fail2ban/jail.d/ssh.conf}/contents&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/enabled&amp;#039; = &amp;#039;true&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/filter&amp;#039; = &amp;#039;sshd&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/action&amp;#039; = &amp;#039;iptables[name=SSH, port=ssh, protocol=tcp]&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/logpath&amp;#039; = &amp;#039;/var/log/secure&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/maxretry&amp;#039; = &amp;#039;5&amp;#039;;&lt;br /&gt;
&amp;#039;ssh-iptables/findtime&amp;#039; = &amp;#039;1800&amp;#039;;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will give :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[ssh-iptables]                                                                                                                 &lt;br /&gt;
action=iptables[name=SSH, port=ssh, protocol=tcp]&lt;br /&gt;
enabled=true&lt;br /&gt;
filter=sshd&lt;br /&gt;
findtime=1800&lt;br /&gt;
logpath=/var/log/secure&lt;br /&gt;
maxretry=5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rougny Romain rrougny@ua.ac.be</name></author>
	</entry>
</feed>