This commit is contained in:
gwen 2025-11-27 16:59:21 +01:00
parent 1364b3b4f2
commit b5c919dc8d

View file

@ -9,10 +9,16 @@ Group variables inside families
- gather :term:`variable`\ s into a :term:`family`
- make a variable within a variable, which turns this variable container into being a family
.. prerequisites:: Reminders
.. prerequisites:: Prerequisites
- We have an idea of what a :term:`structure description file<structure file>` is
- We have a folder named :file:`firefox` and we are putting all the structure description files into it
- We assume that Rougail's library is :ref:`installed <installation>` on your computer.
- If you want to follow this tutorial with the help of the corresponding :tutorial:`Rougail-tutorials git repository <>`,
this workshop page corresponds to the tags :tutorial:`v1.1_020 <src/tag/v1.1_020>` in the repository:
::
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
git checkout v1.1_020
.. type-along:: let's recap: we have this choice type variable
@ -37,25 +43,20 @@ In the structure description file, we have:
.. We're gonna put it in a :term:`family`.
.. warning:: The variables, families, etc. will be created in several files for educational purposes.
Here we made a :file:`firefox/00-proxy.yml` structure file and we're gonna make
a new structure file named :file:`firefox/10-manual.yml`\ .
We could of course have put everything in one file, we decided to separate the files for reasons of ordering and clarity.
So we have now a `proxy_mode` variable.
In short, let's describe our `proxy_mode` variable like this:
.. confval:: proxy_mode
:type: `choice`
:default: No proxy
This is a setting that controls the proxy's type
Proxy mode's settings
Creating a new family
-----------------------
Let's create a family named `manual` which obviously corresponds to the proxy's manual configuration choice.
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_010/firefox/10-manual.yml
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/tag/v1.1_020/firefox/10-manual.yml
:language: yaml
:caption: A family structure file description named `manual` in a :file:`firefox/10-manual.yml` file
:name: RougailManualFamily
@ -66,6 +67,14 @@ Let's create a family named `manual` which obviously corresponds to the proxy's
description: Manual proxy configuration
type: family
.. note:: We wil define the variables, families, etc. in separate files for educational purposes.
It's also a good way to organize your rougail files in the real world.
Here we made a :file:`firefox/00-proxy.yml` structure file and we're gonna make
a new structure file named :file:`firefox/10-manual.yml`\ .
We could of course could have put everything in one file.
It is better to separate the files for reasons of ordering and clarity.
We can see that we have defined a :term:`family` here, and this family is *empty*
(that is the family which is a container variable contains no variable yet).