Compare commits
4 commits
a21e39a4d3
...
49870c1d31
| Author | SHA1 | Date | |
|---|---|---|---|
| 49870c1d31 | |||
| 7e38b4d952 | |||
| a357d97e5a | |||
| afd332b2a9 |
556 changed files with 2527 additions and 3337 deletions
15
README.md
15
README.md
|
|
@ -32,23 +32,23 @@ version: '0.10'
|
|||
# describe a first service with a single file
|
||||
services:
|
||||
- service:
|
||||
- name: my_service
|
||||
file:
|
||||
- engine: jinja2
|
||||
text: /etc/filename
|
||||
- name: my_service
|
||||
file:
|
||||
- engine: jinja
|
||||
text: /etc/filename
|
||||
|
||||
# describe a variable my_first_variable
|
||||
# and a family with a variable my_second_variable
|
||||
variables:
|
||||
- variable:
|
||||
name: my_first_variable
|
||||
- name: my_first_variable
|
||||
value:
|
||||
- text: my_value
|
||||
- family:
|
||||
name: my_family
|
||||
- name: my_family
|
||||
variables:
|
||||
- variable:
|
||||
name: my_second_variable
|
||||
- name: my_second_variable
|
||||
type: number
|
||||
mandatory: true
|
||||
value:
|
||||
|
|
@ -82,7 +82,6 @@ async def main():
|
|||
rougail = Rougail()
|
||||
await rougail.template()
|
||||
|
||||
|
||||
run(main())
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,5 @@ Rougail est un bibliothèque python3 qui permet de charger des dictionnaires (fi
|
|||
|
||||
## Les templates
|
||||
|
||||
- Type creole
|
||||
- Type jinja2
|
||||
FIXME ^^
|
||||
- [Les moteurs de templates](template/README.md)
|
||||
- [Les patches](template/patch.md)
|
||||
|
|
|
|||
|
|
@ -1,79 +1,130 @@
|
|||
# La bibliothèque rougail
|
||||
# La bibliothèque Rougail
|
||||
|
||||
Rougail est une bibliothèque simple a utiliser.
|
||||
Rougail est une bibliothèque qui permet de charger simplement des dictionnaires et de générer des templates.
|
||||
|
||||
Dans les exemples suivant, nous utilisons la configuration par défaut de Rougail. Vous pouvez [personnaliser les répertoires utilisés](config.md).
|
||||
Dans les exemples suivant, nous utiliserons une configuration particulière de Rougail.
|
||||
Vous retrouverez toutes les options pour [personnaliser les répertoires utilisés](config.md).
|
||||
|
||||
## Convertisons un dictionnaire en objet tiramisu
|
||||
|
||||
Commençons par créer un dictionnaire simple.
|
||||
|
||||
Voici un premier dictionnaire /srv/rougail/dictionaries/00-base.xml :
|
||||
|
||||
```xml
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<variables>
|
||||
<variable name="my_variable">
|
||||
<value>my_value</value>
|
||||
</variable>
|
||||
</variables>
|
||||
</rougail>
|
||||
```
|
||||
|
||||
Construisons les objets tiramisu :
|
||||
Le script contiendra donc les éléments de configuration suivant :
|
||||
|
||||
```python
|
||||
from rougail import RougailConvert
|
||||
from rougail import RougailConfig
|
||||
|
||||
rougail = RougailConvert()
|
||||
rougail.save('example.py')
|
||||
RougailConfig['dictionaries_dir'] = ['dict']
|
||||
RougailConfig['templates_dir'] = ['tmpl']
|
||||
RougailConfig['tmp_dir'] = 'tmp'
|
||||
RougailConfig['destinations_dir'] = 'dest'
|
||||
RougailConfig['functions_file'] = 'funcs/functions.py'
|
||||
```
|
||||
|
||||
Un nouveau fichier 'example.py' va être créé dans le répertoire local
|
||||
Penser a créer les répertoires :
|
||||
|
||||
## Convertisons un dictionnaire extra en objet tiramisu
|
||||
```bash
|
||||
mkdir dest dict tmp tmpl extras
|
||||
```
|
||||
|
||||
En plus du dictionnaire précédent, créons un dictionnaire extra /srv/rougail/extra_dictionaries/00-base.xml
|
||||
## Convertisons un dictionnaire
|
||||
|
||||
Un dictionnaire est un ensemble d'instruction qui vont permettre de créer des variables.
|
||||
|
||||
Commençons par créer un [dictionnaire](../dictionary/rougail.md) simple.
|
||||
|
||||
Voici un premier dictionnaire dict/00-base.yml :
|
||||
|
||||
```xml
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<variables>
|
||||
<variable name="my_variable_extra">
|
||||
<value>my_value_extra</value>
|
||||
</variable>
|
||||
</variables>
|
||||
</rougail>
|
||||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
- name: my_variable
|
||||
value:
|
||||
- text: my_value
|
||||
```
|
||||
|
||||
Construisons les objets tiramisu :
|
||||
Puis, créons les objets [Tiramisu](https://framagit.org/tiramisu/tiramisu) :
|
||||
|
||||
```python
|
||||
from rougail import RougailConvert, RougailConfig
|
||||
from rougail import Rougail, RougailConfig
|
||||
from asyncio import run
|
||||
|
||||
RougailConfig['extra_dictionaries']['example'] = ['/srv/rougail/extra_dictionaries/']
|
||||
async def main():
|
||||
RougailConfig['dictionaries_dir'] = ['dict']
|
||||
rougail = Rougail()
|
||||
config = await rougail.get_config()
|
||||
print(await config.value.dict())
|
||||
|
||||
rougail = RougailConvert()
|
||||
rougail.save('example.py')
|
||||
run(main())
|
||||
```
|
||||
|
||||
## Templatisons un template
|
||||
Exécution le script :
|
||||
|
||||
Nous créons un dictionnaire complémentaire pour ajouter notre template /srv/rougail/dictionaries/00-template.xml :
|
||||
```python
|
||||
$ python3 script.py
|
||||
{'rougail.my_variable': 'my_value'}
|
||||
```
|
||||
|
||||
## Convertisons un dictionnaire extra
|
||||
|
||||
L'espace de nommage par défaut des variables et familles est "rougail". Il est possible de définir d'autres espaces de nom.
|
||||
Ces espaces de nom additionnels s'appelle des "[extras](../dictionary/extra.md)".
|
||||
|
||||
Les espaces de nom additionnels se définissent lors de la configuration.
|
||||
|
||||
Par exemple, voici comment ajouter une espace de nom "example" :
|
||||
|
||||
```python
|
||||
RougailConfig['extra_dictionaries']['example'] = ['extras/']
|
||||
```
|
||||
|
||||
Ensuite créons un dictionnaire extra extras/00-base.yml :
|
||||
|
||||
```xml
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<services>
|
||||
<service name="example">
|
||||
<file name="/etc/example.conf"/>
|
||||
</service>
|
||||
</services>
|
||||
</rougail>
|
||||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
- name: my_variable_extra
|
||||
value:
|
||||
- text: my_value_extra
|
||||
```
|
||||
|
||||
Et un template /srv/rougail/templates/example.conf :
|
||||
Construisons les objets Tiramisu :
|
||||
|
||||
```python
|
||||
from rougail import Rougail, RougailConfig
|
||||
from asyncio import run
|
||||
|
||||
async def main():
|
||||
RougailConfig['dictionaries_dir'] = ['dict']
|
||||
RougailConfig['extra_dictionaries']['example'] = ['extras/']
|
||||
rougail = Rougail()
|
||||
config = await rougail.get_config()
|
||||
print(await config.value.dict())
|
||||
|
||||
run(main())
|
||||
```
|
||||
|
||||
Exécution le script :
|
||||
|
||||
```python
|
||||
$ python3 script.py
|
||||
{'rougail.my_variable': 'my_value', 'example.my_variable_extra': 'my_value_extra'}
|
||||
```
|
||||
|
||||
## Templatisons un fichier
|
||||
|
||||
Un template est un fichier dans laquelle on va remplacer les valeurs attendus par le nom des variables.
|
||||
|
||||
Premièrement déclarons dans un dictionnaire complémentaire notre template dict/00-template.yml :
|
||||
|
||||
```xml
|
||||
version: '0.10'
|
||||
services:
|
||||
- service:
|
||||
- name: test
|
||||
file:
|
||||
- text: /etc/example.conf
|
||||
```
|
||||
|
||||
Et un template tmpl/example.conf (par défaut il est généré via une configuration particulière de [CheetahTemplate](https://cheetahtemplate.org/) :
|
||||
|
||||
```
|
||||
The value: %%my_variable
|
||||
|
|
@ -81,42 +132,27 @@ The value: %%my_variable
|
|||
The extra value: %%example.my_variable_extra
|
||||
```
|
||||
|
||||
Générons le fichier tiramisu :
|
||||
|
||||
```python
|
||||
from rougail import RougailConvert, RougailConfig
|
||||
|
||||
RougailConfig['extra_dictionaries']['example'] = ['/srv/rougail/extra_dictionaries/']
|
||||
|
||||
rougail = RougailConvert()
|
||||
rougail.save('example.py')
|
||||
```
|
||||
|
||||
Créer les répertoires utils pour la templatisation :
|
||||
|
||||
```bash
|
||||
mkdir /srv/rougail/destinations /srv/rougail/tmp
|
||||
```
|
||||
|
||||
Générons le template :
|
||||
|
||||
```python
|
||||
import asyncio
|
||||
from example import option_0
|
||||
from tiramisu import Config
|
||||
from rougail import RougailSystemdTemplate
|
||||
from rougail import Rougail, RougailConfig
|
||||
from asyncio import run
|
||||
|
||||
async def template():
|
||||
config = await Config(option_0)
|
||||
engine = RougailSystemdTemplate(config)
|
||||
await engine.instance_files()
|
||||
async def main():
|
||||
RougailConfig['dictionaries_dir'] = ['dict']
|
||||
RougailConfig['templates_dir'] = ['tmpl']
|
||||
RougailConfig['tmp_dir'] = 'tmp'
|
||||
RougailConfig['destinations_dir'] = 'dest'
|
||||
RougailConfig['extra_dictionaries']['example'] = ['extras/']
|
||||
RougailConfig['functions_file'] = 'funcs/functions.py'
|
||||
rougail = Rougail()
|
||||
config = await rougail.get_config()
|
||||
await rougail.template()
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(template())
|
||||
loop.close()
|
||||
run(main())
|
||||
```
|
||||
|
||||
Le fichier /srv/rougail/destinations/etc/example.conf est maintenant créé avec le contenu attendu suivant :
|
||||
Le fichier dest/etc/example.conf est maintenant créé avec le contenu attendu suivant :
|
||||
|
||||
```
|
||||
The value: my_value
|
||||
|
|
@ -124,68 +160,32 @@ The value: my_value
|
|||
The extra value: my_value_extra
|
||||
```
|
||||
|
||||
## Appliquons un patch au template
|
||||
|
||||
Il peut être intéressant de réaliser un patch à un template pour corriger un problème spécifique à notre environnement, sans attendre que le mainteneur du template n'est fait la correction.
|
||||
|
||||
Testons en créant le patch /srv/rougail/patches/example.conf.patch :
|
||||
|
||||
```patch
|
||||
--- /srv/rougail/templates/example.conf 2021-02-13 19:41:38.677491087 +0100
|
||||
+++ tmp/example.conf 2021-02-13 20:12:55.525089820 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
The value: %%my_variable
|
||||
|
||||
The extra value: %%example.my_variable_extra
|
||||
+
|
||||
+Add by a patch
|
||||
```
|
||||
|
||||
Le patch est bien appliquer sur notre fichier /srv/rougail/destinations/etc/example.conf :
|
||||
|
||||
```
|
||||
The value: my_value
|
||||
|
||||
The extra value: my_value_extra
|
||||
|
||||
Add by a patch
|
||||
```
|
||||
|
||||
Deux choses importantes à savoir sur les patchs :
|
||||
|
||||
- le nom du patch est obligatoire le nom du template source + ".patch"
|
||||
- la deuxième ligne doit toujours commencer par "+++ tmp/" + le nom du template source
|
||||
|
||||
## Créons une fonction personnalisé
|
||||
|
||||
Nous créons un dictionnaire complémentaire pour ajouter un calcul à la variable "my_variable" dans /srv/rougail/dictionaries/00-fill.xml :
|
||||
Nous créons un dictionnaire complémentaire pour ajouter un calcul à la variable "my_variable" dans dict/00-fill.yml :
|
||||
|
||||
```xml
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<rougail>
|
||||
<constraints>
|
||||
<fill name="return_no">
|
||||
<target>my_variable</target>
|
||||
</fill>
|
||||
</constraints>
|
||||
</rougail>
|
||||
```yml
|
||||
version: '0.10'
|
||||
constraints:
|
||||
- fill:
|
||||
- name: return_no
|
||||
target:
|
||||
- text: my_variable
|
||||
```
|
||||
|
||||
Puis créons la fonction "return_no" dans /srv/rougail/functions.py :
|
||||
Puis créons la fonction "return_no" dans functions.py :
|
||||
|
||||
```python
|
||||
def return_no():
|
||||
return 'no'
|
||||
```
|
||||
|
||||
Après avoir reconverti les dictionnaires et regénérer le template nous avons donc le contenu du fichier /srv/rougail/destinations/etc/example.conf :
|
||||
Après avoir reconverti les dictionnaires et regénérer le template nous avons donc le contenu du fichier dest/etc/example.conf :
|
||||
|
||||
```
|
||||
The value: no
|
||||
|
||||
The extra value: my_value_extra
|
||||
|
||||
Add by a patch
|
||||
```
|
||||
|
||||
La valeur de la variable "my_variable" est bien calculé à partir de la fonction "return_no".
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ Le répertoire où se trouve les fichiers tmpfile.d sont par défaut dans "/usr/
|
|||
|
||||
### Le moteur de templates par défaut
|
||||
|
||||
Le moteur de template est géré dans la clef "default_files_engine" et a comme valeur par défaut : "creole". Les valeurs possible sont "none", "creole" ou "jinja2".
|
||||
Le moteur de template est géré dans la clef "default_files_engine" et a comme valeur par défaut : "cheetah". Les valeurs possible sont "none", "cheetah" ou "jinja".
|
||||
|
||||
### Les droits par défaut des fichiers
|
||||
|
||||
|
|
@ -129,4 +129,4 @@ La méthode d'inclusion des fichiers générés est géré dans la clef "default
|
|||
|
||||
## La configuration du moteur de templates
|
||||
|
||||
Le moteur de template est géré dans la clef "default_overrides_engine" et a comme valeur par défaut : "creole". Les valeurs possible sont "none", "creole" ou "jinja2".
|
||||
Le moteur de template est géré dans la clef "default_overrides_engine" et a comme valeur par défaut : "cheetah". Les valeurs possible sont "none", "cheetah" ou "jinja".
|
||||
|
|
|
|||
|
|
@ -8,6 +8,14 @@ L'ordre des informations mise dans le dictionnaire est idéalement :
|
|||
- variables
|
||||
- constraintes
|
||||
|
||||
## Le nom d'espace
|
||||
## Nom des fichiers de dictionnaire
|
||||
|
||||
Le nom d'espace dans un dictionnaire est de deux espaces.
|
||||
L'ordre des dictionnaires est important pour l'ordre de création des variables et des familles.
|
||||
|
||||
Les fichiers devront donc démarrés par deux numéros suivit d'un tiret.
|
||||
|
||||
Par exemple : 00-base.xml
|
||||
|
||||
## Le nombre d'espace XML
|
||||
|
||||
Le nombre d'espace dans un dictionnaire au format XML est de deux espaces.
|
||||
|
|
|
|||
|
|
@ -70,11 +70,11 @@ Dans ce cas, il est possible de créé un template, dont le nom est obligatoirem
|
|||
|
||||
Deux types de template sont aujourd'hui disponible :
|
||||
|
||||
- creole
|
||||
- jinja2
|
||||
- cheetah
|
||||
- jinja
|
||||
|
||||
```xml
|
||||
<service name="dev-disk-by\x2dpartlabel-swap" type="swap" engine="creole"/>
|
||||
<service name="dev-disk-by\x2dpartlabel-swap" type="swap" engine="cheetah"/>
|
||||
```
|
||||
|
||||
En YAML :
|
||||
|
|
@ -83,7 +83,7 @@ En YAML :
|
|||
- service:
|
||||
- name: dev-disk-by\x2dpartlabel-swap
|
||||
type: swap
|
||||
engine: creole
|
||||
engine: cheetah
|
||||
```
|
||||
|
||||
Dans ce cas, rougail utilisera le template "dev-disk-by\x2dpartlabel-swap.swap" pour générer le fichier systemd de gestion de ce service.
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ file:
|
|||
|
||||
## Choix du moteur de templating
|
||||
|
||||
Par défaut, le moteur de templating est le moteur de templating compatible avec "creole".
|
||||
Par défaut, le moteur de templating est le moteur de templating compatible avec "cheetah".
|
||||
|
||||
Il est possible de désactiver la templatisation du fichier (il sera alors uniquement copié) :
|
||||
|
||||
|
|
@ -291,17 +291,17 @@ file:
|
|||
text: /etc/squid/squid.conf
|
||||
```
|
||||
|
||||
Ou d'utiliser le moteur "jinja2" :
|
||||
Ou d'utiliser le moteur "jinja" :
|
||||
|
||||
```xml
|
||||
<file engine="jinja2">/etc/squid/squid.conf</file>
|
||||
<file engine="jinja">/etc/squid/squid.conf</file>
|
||||
```
|
||||
|
||||
En YAML :
|
||||
|
||||
```yml
|
||||
file:
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/squid/squid.conf
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Dans ce cas le fichier de destination aura le même nom.
|
|||
|
||||
## Choix du moteur de templating
|
||||
|
||||
Par défaut, le moteur de templating est le moteur de templating compatible avec "creole".
|
||||
Par défaut, le moteur de templating est le moteur de templating compatible avec "cheetah".
|
||||
|
||||
Il est possible de désactiver la templatisation du fichier (il sera alors uniquement copié) :
|
||||
|
||||
|
|
@ -59,17 +59,17 @@ override:
|
|||
- engine: 'none'
|
||||
```
|
||||
|
||||
Ou d'utiliser le moteur "jinja2" :
|
||||
Ou d'utiliser le moteur "jinja" :
|
||||
|
||||
```xml
|
||||
<override engine="jinja2"/>
|
||||
<override engine="jinja"/>
|
||||
```
|
||||
|
||||
En YAML :
|
||||
|
||||
```yml
|
||||
override:
|
||||
- engine: 'jinja2'
|
||||
- engine: 'jinja'
|
||||
```
|
||||
|
||||
Il est possible de personnaliser le moteur par défaut dans la [configuration de rougail](../dev/config.md)
|
||||
|
|
|
|||
103
doc/template/README.md
vendored
Normal file
103
doc/template/README.md
vendored
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
# Les templates
|
||||
|
||||
## Le moteur "cheetah"
|
||||
|
||||
Le moteur de templating par défaut est le moteur [CheetahTemplate](https://cheetahtemplate.org/).
|
||||
|
||||
Par contre, la configuration par défaut de CheetahTemplate a été modifié.
|
||||
|
||||
Dans un template de configuration, il est très fréquent que le caractère "#" est le caractère des commentaires.
|
||||
C'est pourquoi la configuration par défaut a été modifié.
|
||||
|
||||
Les choix sont maintenant les suivants :
|
||||
|
||||
- le caractère des directives : "%" ;
|
||||
- les variables : "%%" ;
|
||||
- le caractère des commentaires : "#".
|
||||
|
||||
Voici quelques exemples d'utilisateurs de ce moteur :
|
||||
|
||||
### utiliser une variable
|
||||
|
||||
```
|
||||
%%variable_name
|
||||
```
|
||||
|
||||
### condition
|
||||
|
||||
```
|
||||
%if %%variable_name == 'oui'
|
||||
text
|
||||
%end if
|
||||
```
|
||||
|
||||
### vérifier si une variable existe
|
||||
|
||||
```
|
||||
%if %%varExists('variable_name')
|
||||
text
|
||||
%end if
|
||||
```
|
||||
|
||||
### boucle
|
||||
|
||||
```
|
||||
%for %%var in %%variable_name
|
||||
%%var
|
||||
%end for
|
||||
```
|
||||
|
||||
### boucle avec variables meneuse et suiveuse
|
||||
|
||||
```
|
||||
%for %%var in %%variable_leader
|
||||
%%var.variable_follower
|
||||
%end for
|
||||
```
|
||||
|
||||
Pour plus d'informations, voir la documentation de CheetahTemplate.
|
||||
|
||||
## Le moteur "jinja"
|
||||
|
||||
Il est possible d'utiliser le moteur de templating [Jinja](https://jinja.palletsprojects.com/).
|
||||
|
||||
Il n'y a pas d'adaptation particulière pour ce moteur.
|
||||
|
||||
Voici quelques exemples d'utilisateurs de ce moteur :
|
||||
|
||||
### utiliser une variable
|
||||
|
||||
```
|
||||
{{ variable_name }}
|
||||
```
|
||||
|
||||
### condition
|
||||
|
||||
```
|
||||
{% if variable_name == 'oui' %}
|
||||
text
|
||||
{% endif -%}
|
||||
```
|
||||
|
||||
### boucle
|
||||
|
||||
```
|
||||
{% for var in variable_name %}
|
||||
{{ var }}
|
||||
{% endfor -%}
|
||||
```
|
||||
|
||||
### boucle avec variables meneuse et suiveuse
|
||||
|
||||
```
|
||||
{% for var in variable_leader %}
|
||||
{{ var.variable_follower }}
|
||||
{% endfor -%}
|
||||
```
|
||||
|
||||
Pour plus d'informations, voir la documentation de Jinja.
|
||||
|
||||
## Le moteur "none"
|
||||
|
||||
Ce moteur permet de copie le fichier sans y apporter la moindre modification.
|
||||
C'est utile pour les templates ne contenant aucune variable ni condition.
|
||||
39
doc/template/patch.md
vendored
Normal file
39
doc/template/patch.md
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Patcher un template
|
||||
|
||||
Il peut être intéressant de réaliser un patch à un template pour corriger un problème spécifique à notre environnement, sans attendre que le mainteneur du template n'est fait la correction.
|
||||
|
||||
Par exemple le template :
|
||||
|
||||
```
|
||||
The value: %%my_value
|
||||
|
||||
The extra value: %%example.my_variable_extra
|
||||
```
|
||||
|
||||
Peut être modifié via le patch :
|
||||
|
||||
```patch
|
||||
--- tmpl/example.conf 2021-02-13 19:41:38.677491087 +0100
|
||||
+++ tmp/example.conf 2021-02-13 20:12:55.525089820 +0100
|
||||
@@ -1,3 +1,5 @@
|
||||
The value: %%my_variable
|
||||
|
||||
The extra value: %%example.my_variable_extra
|
||||
+
|
||||
+Add by a patch
|
||||
```
|
||||
|
||||
Le fichier généré ressemblera alors à cela :
|
||||
|
||||
```
|
||||
The value: my_value
|
||||
|
||||
The extra value: my_value_extra
|
||||
|
||||
Add by a patch
|
||||
```
|
||||
|
||||
Deux choses importantes à savoir sur les patchs :
|
||||
|
||||
- le nom du patch est obligatoire le nom du template source + ".patch"
|
||||
- la deuxième ligne doit toujours commencer par "+++ tmp/" (tmp étant le nom du répertoire mis dans la configuration) + le nom du template source
|
||||
BIN
logo.png
BIN
logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 9 KiB After Width: | Height: | Size: 9.1 KiB |
12
logo.svg
12
logo.svg
|
|
@ -81,14 +81,14 @@
|
|||
|
||||
|
||||
<path
|
||||
style="fill:#0f6d7c;fill-opacity:1"
|
||||
d="m 255.96998,236.37088 v 150.261 h -114.977 c -45.133999,-34.582 -74.239999,-89.01 -74.239999,-150.261 z M 141.15076,386.33867"
|
||||
id="path34"
|
||||
sodipodi:nodetypes="cccccc" /><path
|
||||
style="fill:#115d69;fill-opacity:1"
|
||||
d="m 255.96998,236.37088 v 150.261 h 114.977 c 45.134,-34.582 74.24,-89.01 74.24,-150.261 z M 370.7892,386.33867"
|
||||
d="m 255.96998,236.37088 v 150.261 l 138.67694,2.53103 c 41.40073,-52.97943 50.54006,-91.54103 50.54006,-152.79203 z"
|
||||
id="path34-6"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
sodipodi:nodetypes="ccccc" /><path
|
||||
style="fill:#0f6d7c;fill-opacity:1"
|
||||
d="m 255.96998,236.37088 v 150.261 l -138.67694,2.53103 C 75.892314,336.18348 66.752984,297.62187 66.752984,236.37088 Z"
|
||||
id="path34-6-3"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.8 KiB |
|
|
@ -28,8 +28,39 @@ along with this program; if not, write to the Free Software
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
"""
|
||||
from .convert import RougailConvert
|
||||
from .template.base import RougailBaseTemplate
|
||||
from .template.systemd import RougailSystemdTemplate
|
||||
from .config import RougailConfig
|
||||
from rougail.update import RougailUpgrade
|
||||
from tiramisu import Config
|
||||
from .update import RougailUpgrade
|
||||
|
||||
__ALL__ = ('RougailConvert', 'RougailSystemdTemplate', 'RougailConfig', 'RougailUpgrade')
|
||||
|
||||
class Rougail:
|
||||
def __init__(self,
|
||||
rougailconfig: RougailConfig=None,
|
||||
) -> None:
|
||||
if rougailconfig is None:
|
||||
rougailconfig = RougailConfig
|
||||
self.rougailconfig = rougailconfig
|
||||
self.converted = RougailConvert(self.rougailconfig)
|
||||
self.config = None
|
||||
|
||||
async def get_config(self):
|
||||
if not self.config:
|
||||
tiram_obj = self.converted.save(None)
|
||||
optiondescription = {}
|
||||
exec(tiram_obj, None, optiondescription)
|
||||
self.config = await Config(optiondescription['option_0'])
|
||||
return self.config
|
||||
|
||||
async def template(self,
|
||||
type: str='base',
|
||||
) -> None:
|
||||
config = await self.get_config()
|
||||
if type == 'base':
|
||||
engine = RougailBaseTemplate(config, self.rougailconfig)
|
||||
else:
|
||||
engine = RougailSystemdTemplate(config, self.rougailconfig)
|
||||
await engine.instance_files()
|
||||
|
||||
__ALL__ = ('Rougail', 'RougailConvert', 'RougailBaseTemplate', 'RougailSystemdTemplate', 'RougailConfig', 'RougailUpgrade')
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ RougailConfig = {'dictionaries_dir': [join(ROUGAILROOT, 'dictionaries')],
|
|||
'modes_level': ['basic', 'normal', 'expert'],
|
||||
'default_family_mode': 'basic',
|
||||
'default_variable_mode': 'normal',
|
||||
'default_files_engine': 'creole',
|
||||
'default_files_engine': 'cheetah',
|
||||
'default_files_mode': '0644',
|
||||
'default_files_owner': 'root',
|
||||
'default_files_group': 'root',
|
||||
'default_files_included': 'no',
|
||||
'default_overrides_engine': 'creole',
|
||||
'default_overrides_engine': 'cheetah',
|
||||
'default_service_names_engine': 'none',
|
||||
'default_systemd_directory': '/systemd',
|
||||
'base_option_name': 'baseoption',
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ procedures.
|
|||
"""
|
||||
|
||||
from typing import List
|
||||
from tiramisu import Config
|
||||
|
||||
from .i18n import _
|
||||
from .config import RougailConfig
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<!ATTLIST service manage (True|False) "True">
|
||||
<!ATTLIST service servicelist CDATA #IMPLIED>
|
||||
<!ATTLIST service disabled (True|False) "False">
|
||||
<!ATTLIST service engine (none|creole|jinja2) #IMPLIED>
|
||||
<!ATTLIST service engine (none|cheetah|jinja) #IMPLIED>
|
||||
<!ATTLIST service target CDATA #IMPLIED>
|
||||
<!ATTLIST service type (service|mount|swap|timer|target) "service">
|
||||
<!ATTLIST service undisable (True|False) "False">
|
||||
|
|
@ -77,13 +77,13 @@
|
|||
<!ATTLIST file group_type (unix_user|variable) "unix_user">
|
||||
<!ATTLIST file filelist CDATA #IMPLIED>
|
||||
<!ATTLIST file redefine (True|False) "False">
|
||||
<!ATTLIST file engine (none|creole|jinja2|creole_legacy) #IMPLIED>
|
||||
<!ATTLIST file engine (none|cheetah|jinja|creole_legacy) #IMPLIED>
|
||||
<!ATTLIST file included (no|name|content) #IMPLIED>
|
||||
<!ATTLIST file disabled (True|False) "False">
|
||||
|
||||
<!ELEMENT override EMPTY>
|
||||
<!ATTLIST override source CDATA #IMPLIED>
|
||||
<!ATTLIST override engine (none|creole|jinja2) #IMPLIED>
|
||||
<!ATTLIST override engine (none|cheetah|jinja) #IMPLIED>
|
||||
|
||||
<!ELEMENT variables ((variable*|family*)*)>
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -157,16 +157,18 @@ class SubYAML:
|
|||
lists = []
|
||||
for dico in self.dico:
|
||||
for key, value in dico.items():
|
||||
lists.append((key, [value]))
|
||||
if not isinstance(value, list):
|
||||
value = [value]
|
||||
lists.append((key, value))
|
||||
else:
|
||||
lists = []
|
||||
for key, values in self.dico.items():
|
||||
if key == 'variables':
|
||||
for v in values:
|
||||
if 'variable' in v:
|
||||
lists.append(('variable', [v['variable']]))
|
||||
lists.append(('variable', v['variable']))
|
||||
if 'family' in v:
|
||||
lists.append(('family', [v['family']]))
|
||||
lists.append(('family', v['family']))
|
||||
else:
|
||||
lists.append((key, values))
|
||||
for key, values in lists:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ from shutil import copy
|
|||
import logging
|
||||
from typing import Dict, Any
|
||||
from subprocess import call
|
||||
from os import listdir, makedirs, getcwd, chdir, unlink, rmdir
|
||||
from os import listdir, makedirs, getcwd, chdir, unlink, rmdir, chmod
|
||||
from os.path import dirname, join, isfile, isdir, abspath
|
||||
|
||||
|
||||
|
|
@ -467,9 +467,20 @@ class RougailBaseTemplate:
|
|||
pass
|
||||
|
||||
def process(self,
|
||||
*args,
|
||||
): # pragma: no cover
|
||||
raise NotImplementedError(_('cannot processed'))
|
||||
filename: str,
|
||||
destfilename: str,
|
||||
mode: str,
|
||||
owner: str,
|
||||
group: str,
|
||||
) -> None:
|
||||
if owner not in [None, self.rougailconfig['default_files_owner']]:
|
||||
#FIXME
|
||||
raise TemplateError(_(f'cannot change owner of file {destfilename}'))
|
||||
if group not in [None, self.rougailconfig['default_files_group']]:
|
||||
#FIXME
|
||||
raise TemplateError(_(f'cannot change group of file {destfilename}'))
|
||||
if mode not in [None, self.rougailconfig['default_files_mode']]:
|
||||
chmod(destfilename, eval(f'0o{mode}'))
|
||||
|
||||
def post_instance(self): # pragma: no cover
|
||||
pass
|
||||
|
|
@ -480,9 +491,22 @@ class RougailBaseTemplate:
|
|||
raise NotImplementedError(_('cannot instanciate this service type ip'))
|
||||
|
||||
def get_data_files(self,
|
||||
*args,
|
||||
filevar: Dict,
|
||||
destfile: str,
|
||||
service_name: str,
|
||||
variable,
|
||||
idx: int,
|
||||
) -> None: # pragma: no cover
|
||||
raise NotImplementedError(_('cannot instanciate this service type file'))
|
||||
source = filevar['source']
|
||||
if not isfile(source): # pragma: no cover
|
||||
raise FileNotFound(_(f'Source file "{source}" does not exist in {", ".join(self.templates_dir)}'))
|
||||
tmp_file = join(self.tmp_dir, source)
|
||||
#self.instance_file(fill, 'files')
|
||||
if variable:
|
||||
var = variable[idx]
|
||||
else:
|
||||
var = None
|
||||
return tmp_file, None, destfile, var
|
||||
|
||||
def get_data_service(self,
|
||||
*args,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from . import none, creole, jinja2, creole_legacy
|
||||
from . import none, cheetah, jinja, creole_legacy
|
||||
|
||||
|
||||
__all__ = ('none', 'creole', 'jinja2', 'creole_legacy')
|
||||
__all__ = ('none', 'cheetah', 'jinja', 'creole_legacy')
|
||||
|
|
|
|||
|
|
@ -43,10 +43,7 @@ def cl_compile(kls, *args, **kwargs):
|
|||
"""
|
||||
kwargs['compilerSettings'] = {'directiveStartToken': '%',
|
||||
'cheetahVarStartToken': '%%',
|
||||
'EOLSlurpToken': '%',
|
||||
'commentStartToken': '#',
|
||||
'multiLineCommentStartToken': '#*',
|
||||
'multiLineCommentEndToken': '*#',
|
||||
}
|
||||
return kls.old_compile(*args, **kwargs) # pylint: disable=E1101
|
||||
Template.old_compile = Template.compile
|
||||
|
|
@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
from typing import Dict, Any
|
||||
from Cheetah.NameMapper import NotFound
|
||||
|
||||
from .creole import CheetahTemplate as oriCheetahTemplate
|
||||
from .cheetah import CheetahTemplate as oriCheetahTemplate
|
||||
from ...i18n import _
|
||||
from ...utils import normalize_family
|
||||
from ...error import TemplateError
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
"""Jinja2 engine
|
||||
"""Jinja engine
|
||||
|
||||
Created by:
|
||||
EOLE (http://eole.orion.education.fr)
|
||||
|
|
@ -51,7 +51,7 @@ def process(filename: str,
|
|||
# full path of the destination file
|
||||
dir_name, template_name = filename.rsplit('/', 1)
|
||||
if source is not None: # pragma: no cover
|
||||
raise TemplateError(_('source is not supported for jinja2'))
|
||||
raise TemplateError(_('source is not supported for jinja'))
|
||||
var = {}
|
||||
if variable is not None:
|
||||
var['rougail_variable'] = variable
|
||||
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
"""
|
||||
|
||||
from typing import Dict, Any
|
||||
from os import makedirs, symlink, chmod
|
||||
from os import makedirs, symlink
|
||||
from os.path import dirname, isfile, join
|
||||
from ipaddress import ip_network
|
||||
|
||||
|
|
@ -78,24 +78,6 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
|
|||
%end for
|
||||
"""
|
||||
|
||||
def get_data_files(self,
|
||||
filevar: Dict,
|
||||
destfile: str,
|
||||
service_name: str,
|
||||
variable,
|
||||
idx: int,
|
||||
) -> tuple:
|
||||
source = filevar['source']
|
||||
if not isfile(source): # pragma: no cover
|
||||
raise FileNotFound(_(f'Source file "{source}" does not exist in {", ".join(self.templates_dir)}'))
|
||||
tmp_file = join(self.tmp_dir, source)
|
||||
#self.instance_file(fill, 'files')
|
||||
if variable:
|
||||
var = variable[idx]
|
||||
else:
|
||||
var = None
|
||||
return tmp_file, None, destfile, var
|
||||
|
||||
def get_data_overrides(self,
|
||||
filevar: Dict,
|
||||
destfile,
|
||||
|
|
@ -169,17 +151,17 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
|
|||
destfile = f'{self.rougailconfig["default_systemd_directory"]}/system/{service_name}.d/rougail_ip.conf'
|
||||
destfilename = join(self.destinations_dir, destfile[1:])
|
||||
makedirs(dirname(destfilename), exist_ok=True)
|
||||
self.log.info(_(f"creole processing: '{destfilename}'"))
|
||||
self.engines['creole'].process(filename=None,
|
||||
source=ROUGAIL_IP_TEMPLATE,
|
||||
true_destfilename=destfile,
|
||||
destfilename=destfilename,
|
||||
destdir=self.destinations_dir,
|
||||
variable=self.ip_per_service,
|
||||
index=None,
|
||||
rougail_variables_dict=self.rougail_variables_dict,
|
||||
eosfunc=self.eosfunc,
|
||||
)
|
||||
self.log.info(_(f"Cheetah processing: '{destfilename}'"))
|
||||
self.engines['cheetah'].process(filename=None,
|
||||
source=ROUGAIL_IP_TEMPLATE,
|
||||
true_destfilename=destfile,
|
||||
destfilename=destfilename,
|
||||
destdir=self.destinations_dir,
|
||||
variable=self.ip_per_service,
|
||||
index=None,
|
||||
rougail_variables_dict=self.rougail_variables_dict,
|
||||
eosfunc=self.eosfunc,
|
||||
)
|
||||
self.ip_per_service = None
|
||||
|
||||
def process(self,
|
||||
|
|
@ -196,20 +178,19 @@ C %%filename %%file.mode %%file.owner %%file.group - {self.rougailconfig['tmpfil
|
|||
raise TemplateError(_(f'cannot change owner of file {destfilename}'))
|
||||
if group not in [None, self.rougailconfig['default_files_group']]:
|
||||
raise TemplateError(_(f'cannot change group of file {destfilename}'))
|
||||
if mode not in [None, self.rougailconfig['default_files_mode']]:
|
||||
chmod(destfilename, eval(f'0o{mode}'))
|
||||
super().process(filename, destfilename, mode, owner, group)
|
||||
|
||||
def post_instance(self):
|
||||
destfilename = join(self.destinations_dir, ROUGAIL_DEST_FILE[1:])
|
||||
makedirs(dirname(destfilename), exist_ok=True)
|
||||
self.log.info(_(f"creole processing: '{destfilename}'"))
|
||||
self.engines['creole'].process(filename=None,
|
||||
source=self.rougail_tmpl_template,
|
||||
true_destfilename=ROUGAIL_DEST_FILE,
|
||||
destfilename=destfilename,
|
||||
destdir=self.destinations_dir,
|
||||
variable=None,
|
||||
index=None,
|
||||
rougail_variables_dict=self.rougail_variables_dict,
|
||||
eosfunc=self.eosfunc,
|
||||
)
|
||||
self.log.info(_(f"Cheetah processing: '{destfilename}'"))
|
||||
self.engines['cheetah'].process(filename=None,
|
||||
source=self.rougail_tmpl_template,
|
||||
true_destfilename=ROUGAIL_DEST_FILE,
|
||||
destfilename=destfilename,
|
||||
destdir=self.destinations_dir,
|
||||
variable=None,
|
||||
index=None,
|
||||
rougail_variables_dict=self.rougail_variables_dict,
|
||||
eosfunc=self.eosfunc,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: myvar
|
||||
- name: myvar
|
||||
auto_freeze: true
|
||||
value:
|
||||
- text: 'no'
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
value:
|
||||
- text: false
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: my_var
|
||||
- name: my_var
|
||||
auto_freeze: true
|
||||
mode: expert
|
||||
value:
|
||||
- text: 'no'
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
value:
|
||||
- text: false
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
auto_save: true
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
auto_save: true
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
value:
|
||||
- text: non
|
||||
- variable:
|
||||
name: without_type
|
||||
- name: without_type
|
||||
value:
|
||||
- text: non
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: "g\xE9n\xE9ral"
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
value:
|
||||
- text: false
|
||||
- variable:
|
||||
name: my_variable
|
||||
- name: my_variable
|
||||
auto_freeze: true
|
||||
hidden: true
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
value:
|
||||
- text: non
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
hidden: true
|
||||
value:
|
||||
- text: non
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: domain
|
||||
- name: domain
|
||||
type: domainname
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -47,7 +47,7 @@ optiondescription_16.impl_set_information('source', "file")
|
|||
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_20 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
|
||||
optiondescription_19.impl_set_information('engine', "jinja2")
|
||||
optiondescription_19.impl_set_information('engine', "jinja")
|
||||
optiondescription_19.impl_set_information('source', "file2")
|
||||
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
option_13 = FilenameOption(name="name", doc="name", default="/etc/file3")
|
||||
option_12 = BoolOption(name="activate", doc="activate", default=False)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
option_15 = FilenameOption(name="name", doc="name", default="/etc/file3")
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=False)
|
||||
|
|
@ -51,7 +51,7 @@ optiondescription_19.impl_set_information('source', "file")
|
|||
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_23 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
|
||||
optiondescription_22.impl_set_information('engine', "jinja2")
|
||||
optiondescription_22.impl_set_information('engine', "jinja")
|
||||
optiondescription_22.impl_set_information('source', "file2")
|
||||
option_27 = FilenameOption(name="name", doc="name", default="/etc/file3")
|
||||
option_26 = BoolOption(name="activate", doc="activate", default=False)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
<file disabled='True'>/etc/file3</file>
|
||||
</service>
|
||||
</services>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
- disabled: true
|
||||
text: /etc/file3
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -47,7 +47,7 @@ optiondescription_16.impl_set_information('source', "file")
|
|||
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_20 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
|
||||
optiondescription_19.impl_set_information('engine', "jinja2")
|
||||
optiondescription_19.impl_set_information('engine', "jinja")
|
||||
optiondescription_19.impl_set_information('source', "file2")
|
||||
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
option_13 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_12 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
option_15 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -52,7 +52,7 @@ optiondescription_19.impl_set_information('source', "file")
|
|||
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_23 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
|
||||
optiondescription_22.impl_set_information('engine', "jinja2")
|
||||
optiondescription_22.impl_set_information('engine', "jinja")
|
||||
optiondescription_22.impl_set_information('source', "file2")
|
||||
option_27 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_26 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
<file included="content">/etc/dir/incfile</file>
|
||||
</service>
|
||||
</services>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
- included: content
|
||||
text: /etc/dir/incfile
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
option_13 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_12 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
option_15 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -52,7 +52,7 @@ optiondescription_19.impl_set_information('source', "file")
|
|||
option_24 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_23 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_22 = OptionDescription(name="file2", doc="file2", children=[option_24, option_23])
|
||||
optiondescription_22.impl_set_information('engine', "jinja2")
|
||||
optiondescription_22.impl_set_information('engine', "jinja")
|
||||
optiondescription_22.impl_set_information('source', "file2")
|
||||
option_27 = FilenameOption(name="name", doc="name", default="/etc/dir/incfile")
|
||||
option_26 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
<file included="name">/etc/dir/incfile</file>
|
||||
</service>
|
||||
</services>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
- included: name
|
||||
text: /etc/dir/incfile
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ option_13 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_14 = UsernameOption(name="owner", doc="owner", default="nobody")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_13, option_14, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_10])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ option_15 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_16 = UsernameOption(name="owner", doc="owner", default="nobody")
|
||||
option_13 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_12 = OptionDescription(name="file2", doc="file2", children=[option_14, option_15, option_16, option_13])
|
||||
optiondescription_12.impl_set_information('engine', "jinja2")
|
||||
optiondescription_12.impl_set_information('engine', "jinja")
|
||||
optiondescription_12.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_12])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -55,7 +55,7 @@ option_28 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_29 = UsernameOption(name="owner", doc="owner", default="nobody")
|
||||
option_26 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_25 = OptionDescription(name="file2", doc="file2", children=[option_27, option_28, option_29, option_26])
|
||||
optiondescription_25.impl_set_information('engine', "jinja2")
|
||||
optiondescription_25.impl_set_information('engine', "jinja")
|
||||
optiondescription_25.impl_set_information('source', "file2")
|
||||
optiondescription_19 = OptionDescription(name="files", doc="files", children=[optiondescription_20, optiondescription_25])
|
||||
option_18 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file owner="nobody" group="nobody">/etc/file</file>
|
||||
<file owner="nobody" group="nobody" engine="jinja2">/etc/file2</file>
|
||||
<file owner="nobody" group="nobody" engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -8,14 +8,14 @@ services:
|
|||
text: /etc/file
|
||||
- owner: nobody
|
||||
group: nobody
|
||||
engine: jinja2
|
||||
engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ option_15 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_16 = SymLinkOption(name="owner", opt=option_3)
|
||||
option_13 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_12 = OptionDescription(name="file2", doc="file2", children=[option_14, option_15, option_16, option_13])
|
||||
optiondescription_12.impl_set_information('engine', "jinja2")
|
||||
optiondescription_12.impl_set_information('engine', "jinja")
|
||||
optiondescription_12.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_12])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ option_19 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_20 = SymLinkOption(name="owner", opt=option_3)
|
||||
option_17 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_16 = OptionDescription(name="file2", doc="file2", children=[option_18, option_19, option_20, option_17])
|
||||
optiondescription_16.impl_set_information('engine', "jinja2")
|
||||
optiondescription_16.impl_set_information('engine', "jinja")
|
||||
optiondescription_16.impl_set_information('source', "file2")
|
||||
optiondescription_10 = OptionDescription(name="files", doc="files", children=[optiondescription_11, optiondescription_16])
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -59,7 +59,7 @@ option_32 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
|||
option_33 = SymLinkOption(name="owner", opt=option_7)
|
||||
option_30 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_29 = OptionDescription(name="file2", doc="file2", children=[option_31, option_32, option_33, option_30])
|
||||
optiondescription_29.impl_set_information('engine', "jinja2")
|
||||
optiondescription_29.impl_set_information('engine', "jinja")
|
||||
optiondescription_29.impl_set_information('source', "file2")
|
||||
optiondescription_23 = OptionDescription(name="files", doc="files", children=[optiondescription_24, optiondescription_29])
|
||||
option_22 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file owner_type='variable' owner="owner" group_type='variable' group="group">/etc/file</file>
|
||||
<file owner_type='variable' owner="owner" group_type='variable' group="group" engine="jinja2">/etc/file2</file>
|
||||
<file owner_type='variable' owner="owner" group_type='variable' group="group" engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -12,25 +12,23 @@ services:
|
|||
owner: owner
|
||||
group_type: variable
|
||||
group: group
|
||||
engine: jinja2
|
||||
engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
- text: non
|
||||
- variable:
|
||||
name: owner
|
||||
- name: owner
|
||||
type: unix_user
|
||||
value:
|
||||
- text: nobody
|
||||
- variable:
|
||||
name: group
|
||||
- name: group
|
||||
type: unix_user
|
||||
value:
|
||||
- text: nobody
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -47,7 +47,7 @@ optiondescription_16.impl_set_information('source', "file")
|
|||
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_20 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
|
||||
optiondescription_19.impl_set_information('engine', "jinja2")
|
||||
optiondescription_19.impl_set_information('engine', "jinja")
|
||||
optiondescription_19.impl_set_information('source', "file2")
|
||||
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "file")
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="file2", doc="file2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "file2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "file")
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="file2", doc="file2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "file2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -47,7 +47,7 @@ optiondescription_16.impl_set_information('source', "file")
|
|||
option_21 = FilenameOption(name="name", doc="name", default="/etc/file2")
|
||||
option_20 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_19 = OptionDescription(name="file2", doc="file2", children=[option_21, option_20])
|
||||
optiondescription_19.impl_set_information('engine', "jinja2")
|
||||
optiondescription_19.impl_set_information('engine', "jinja")
|
||||
optiondescription_19.impl_set_information('source', "file2")
|
||||
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/file</file>
|
||||
<file engine="jinja2">/etc/file2</file>
|
||||
<file engine="jinja">/etc/file2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/file
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/file2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_5.impl_set_information('source', "systemd-makefs@dev-disk-by\\
|
|||
option_10 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
option_9 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_8 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_10, option_9])
|
||||
optiondescription_8.impl_set_information('engine', "jinja2")
|
||||
optiondescription_8.impl_set_information('engine', "jinja")
|
||||
optiondescription_8.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
optiondescription_4 = OptionDescription(name="files", doc="files", children=[optiondescription_5, optiondescription_8])
|
||||
option_3 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ optiondescription_7.impl_set_information('source', "systemd-makefs@dev-disk-by\\
|
|||
option_12 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
option_11 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_10 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_12, option_11])
|
||||
optiondescription_10.impl_set_information('engine', "jinja2")
|
||||
optiondescription_10.impl_set_information('engine', "jinja")
|
||||
optiondescription_10.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
optiondescription_6 = OptionDescription(name="files", doc="files", children=[optiondescription_7, optiondescription_10])
|
||||
option_5 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
@ -47,7 +47,7 @@ optiondescription_16.impl_set_information('source', "systemd-makefs@dev-disk-by\
|
|||
option_21 = FilenameOption(name="name", doc="name", default="/etc/systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
option_20 = BoolOption(name="activate", doc="activate", default=True)
|
||||
optiondescription_19 = OptionDescription(name="systemd_makefs@dev_disk_by\\x2dpartlabel2", doc="systemd-makefs@dev-disk-by\\x2dpartlabel2", children=[option_21, option_20])
|
||||
optiondescription_19.impl_set_information('engine', "jinja2")
|
||||
optiondescription_19.impl_set_information('engine', "jinja")
|
||||
optiondescription_19.impl_set_information('source', "systemd-makefs@dev-disk-by\\x2dpartlabel2")
|
||||
optiondescription_15 = OptionDescription(name="files", doc="files", children=[optiondescription_16, optiondescription_19])
|
||||
option_14 = BoolOption(name="activate", doc="activate", default=True)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<services>
|
||||
<service name="test">
|
||||
<file>/etc/systemd-makefs@dev-disk-by\x2dpartlabel</file>
|
||||
<file engine="jinja2">/etc/systemd-makefs@dev-disk-by\x2dpartlabel2</file>
|
||||
<file engine="jinja">/etc/systemd-makefs@dev-disk-by\x2dpartlabel2</file>
|
||||
</service>
|
||||
</services>
|
||||
<variables>
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ services:
|
|||
- name: test
|
||||
file:
|
||||
- text: /etc/systemd-makefs@dev-disk-by\x2dpartlabel
|
||||
- engine: jinja2
|
||||
- engine: jinja
|
||||
text: /etc/systemd-makefs@dev-disk-by\x2dpartlabel2
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: float
|
||||
- name: float
|
||||
type: float
|
||||
description: Description
|
||||
value:
|
||||
- text: 0.527
|
||||
- variable:
|
||||
name: float_multi
|
||||
- name: float_multi
|
||||
type: float
|
||||
description: Description
|
||||
multi: true
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
help: message with '
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: Redefine description
|
||||
help: message with "
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: float
|
||||
- name: float
|
||||
type: float
|
||||
description: Description
|
||||
provider: float
|
||||
value:
|
||||
- text: 0.527
|
||||
- variable:
|
||||
name: float_multi
|
||||
- name: float_multi
|
||||
type: float
|
||||
description: Description
|
||||
multi: true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: float
|
||||
- name: float
|
||||
type: float
|
||||
description: Description
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: example
|
||||
- name: example
|
||||
variables:
|
||||
- variable:
|
||||
name: description
|
||||
- name: description
|
||||
type: string
|
||||
provider: example
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: float
|
||||
- name: float
|
||||
type: float
|
||||
description: Description
|
||||
provider: float
|
||||
hidden: true
|
||||
value:
|
||||
- text: 0.527
|
||||
- variable:
|
||||
name: float_multi
|
||||
- name: float_multi
|
||||
type: float
|
||||
description: Description
|
||||
multi: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: Redefine description
|
||||
hidden: true
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: general
|
||||
- name: general
|
||||
type: string
|
||||
description: description
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: my_variable
|
||||
- name: my_variable
|
||||
type: boolean
|
||||
mandatory: false
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
description: Other description
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
value:
|
||||
- text: non
|
||||
|
|
|
|||
|
|
@ -1,16 +1,14 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: my_var1
|
||||
- name: my_var1
|
||||
auto_freeze: true
|
||||
value:
|
||||
- text: 'no'
|
||||
- variable:
|
||||
name: my_var2
|
||||
- name: my_var2
|
||||
value:
|
||||
- text: 'no'
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
value:
|
||||
- text: false
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- variable:
|
||||
name: server_deployed
|
||||
- name: server_deployed
|
||||
type: boolean
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
auto_save: true
|
||||
value:
|
||||
- text: non
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
value:
|
||||
|
|
|
|||
|
|
@ -1,17 +1,16 @@
|
|||
version: '0.10'
|
||||
variables:
|
||||
- family:
|
||||
name: general
|
||||
- name: general
|
||||
mode: basic
|
||||
variables:
|
||||
- variable:
|
||||
name: mode_conteneur_actif
|
||||
- name: mode_conteneur_actif
|
||||
type: string
|
||||
description: No change
|
||||
mandatory: true
|
||||
mode: expert
|
||||
- variable:
|
||||
name: mode_conteneur_actif1
|
||||
- name: mode_conteneur_actif1
|
||||
type: string
|
||||
description: No change
|
||||
value:
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue