<file name='a'/> => <file>a</file>
This commit is contained in:
parent
ac0e510e40
commit
04f8fc048c
@ -11,7 +11,7 @@ Il est nécessaire, au minimum, de spécifier le chemin complet du fichier :
|
||||
```
|
||||
<services>
|
||||
<service name="squid">
|
||||
<file name="/etc/squid/squid.conf"/>
|
||||
<file>/etc/squid/squid.conf</file>
|
||||
</service>
|
||||
</services>
|
||||
```
|
||||
@ -21,7 +21,7 @@ Dans ce cas, le nom du template est déduit du nom du fichier, ici cela sera "sq
|
||||
Si le template a un nom différent (par exemple si plusieurs template se retrouve avec le même nom), il est possible de changer le nom du template avec l'attribut source :
|
||||
|
||||
```
|
||||
<file name="/etc/squid/squid.conf" source="template-squid.conf"/>
|
||||
<file source="template-squid.conf">/etc/squid/squid.conf</file>
|
||||
```
|
||||
|
||||
## Les noms de fichiers dynamique
|
||||
@ -31,7 +31,7 @@ Il est possible également de définir le nom du fichier dans une variable :
|
||||
```
|
||||
<services>
|
||||
<service name="squid">
|
||||
<file name="my_variable" file_type="variable" source="squid.conf"/>
|
||||
<file file_type="variable" source="squid.conf">my_variable</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
@ -50,7 +50,7 @@ Il est même possible de définir une variable de type multiple, ce qui génère
|
||||
```
|
||||
<services>
|
||||
<service name="squid">
|
||||
<file name="my_variable" file_type="variable" source="squid.conf"/>
|
||||
<file file_type="variable" source="squid.conf">my_variable</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
@ -74,7 +74,7 @@ En effet, il est possible de passer le contenu d'une variable au template :
|
||||
```
|
||||
<services>
|
||||
<service name="squid">
|
||||
<file name="my_variable1" file_type="variable" source="squid.conf" variable="my_variable2"/>
|
||||
<file file_type="variable" source="squid.conf" variable="my_variable2">my_variable1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
@ -100,7 +100,7 @@ Par défaut les droits du fichier généré sont "0644" avec comme utilisateur "
|
||||
Il est possible de définir une autre valeur à un ou plusieurs de ces attributs :
|
||||
|
||||
```
|
||||
<file name="/etc/squid/squid.conf" mode="0640" owner="nobody" group="squid"/>
|
||||
<file mode="0640" owner="nobody" group="squid">/etc/squid/squid.conf</file>
|
||||
```
|
||||
|
||||
## Désactiver la génération d'un fichier
|
||||
@ -110,7 +110,7 @@ Il est possible de définir une [condition](../condition/README.md) de type "dis
|
||||
```
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/squid/squid.conf" filelist="squid"/>
|
||||
<file filelist="squid">/etc/squid/squid.conf</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
@ -131,7 +131,7 @@ Dans ce cas, tous les fichiers avec un attribut filelist à "squid" seront désa
|
||||
Il est possible de redéfinir les éléments d'un fichier dans un dictionnaire différent en utilisant l'attribut redefine :
|
||||
|
||||
```
|
||||
<file name="/etc/squid/squid.conf" source="template-squid.conf" redefine="True"/>
|
||||
<file source="template-squid.conf" redefine="True">/etc/squid/squid.conf</file>
|
||||
```
|
||||
|
||||
## Choix du moteur de templating
|
||||
@ -141,5 +141,5 @@ Par défaut, le moteur de templating est le moteur de templating compatible avec
|
||||
Aujourd'hui il est possible de désactiver la templatisation du fichier (il sera alors uniquement copié) :
|
||||
|
||||
```
|
||||
<file name="/etc/squid/squid.conf" templating="none"/>
|
||||
<file templating="none">/etc/squid/squid.conf</file>
|
||||
```
|
||||
|
@ -61,8 +61,7 @@
|
||||
<!ATTLIST ip netmask_type (variable) "variable">
|
||||
<!ATTLIST ip netmask CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT file EMPTY>
|
||||
<!ATTLIST file name CDATA #REQUIRED>
|
||||
<!ELEMENT file (#PCDATA)>
|
||||
<!ATTLIST file file_type (filename|variable) "filename">
|
||||
<!ATTLIST file variable CDATA #IMPLIED>
|
||||
<!ATTLIST file variable_type (variable) "variable">
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file"/>
|
||||
<file>/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file"/>
|
||||
<file>/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file"/>
|
||||
<file>/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/systemd-makefs@dev-disk-by\x2dpartlabel"/>
|
||||
<file>/etc/systemd-makefs@dev-disk-by\x2dpartlabel</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file name="/tmp/file2" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
<file filelist="afilllist">/tmp/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file" templating="none"/>
|
||||
<file templating="none">/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/file"/>
|
||||
<file>/etc/file</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file name='/rougail.conf'/>
|
||||
<file>/etc/mailname</file>
|
||||
<file>/rougail.conf</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='file_name' file_type="variable" source="mailname"/>
|
||||
<file file_type="variable" source="mailname">file_name</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='file_name' file_type="variable" source="mailname" variable="var"/>
|
||||
<file file_type="variable" source="mailname" variable="var">file_name</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='file_name' file_type="variable" source="mailname" variable="var"/>
|
||||
<file file_type="variable" source="mailname" variable="var">file_name</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file name='/etc/eole/mailname'/>
|
||||
<file name='/rougail.conf'/>
|
||||
<file>/etc/mailname</file>
|
||||
<file>/etc/eole/mailname</file>
|
||||
<file>/rougail.conf</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file name='/etc/mailname2'/>
|
||||
<file>/etc/mailname</file>
|
||||
<file>/etc/mailname2</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname'/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='/etc/mailname' source="mailname.new" redefine="True"/>
|
||||
<file source="mailname.new" redefine="True">/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
</rougail>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test' manage="False">
|
||||
<file name="/tmp/test"/>
|
||||
<file>/tmp/test</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test'>
|
||||
<file name='file_name' file_type="variable"/>
|
||||
<file file_type="variable">file_name</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/mailname"/>
|
||||
<file>/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/etc/mailname" source="mailname.new"/>
|
||||
<file source="mailname.new">/etc/mailname</file>
|
||||
</service>
|
||||
</services>
|
||||
</rougail>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name="test">
|
||||
<file name="/tmp/file1" filelist="afilllist"/>
|
||||
<file filelist="afilllist">/tmp/file1</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
13
tests/dictionaries/80service_not_managed_port/00-base.xml
Normal file
13
tests/dictionaries/80service_not_managed_port/00-base.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rougail version="0.9">
|
||||
<services>
|
||||
<service name='test' manage="False">
|
||||
<port>10</port>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
<variable name='var' type='string'>
|
||||
<value>mailname</value>
|
||||
</variable>
|
||||
</variables>
|
||||
</rougail>
|
Loading…
Reference in New Issue
Block a user