diff for dynamic family
This commit is contained in:
parent
5cc1e50669
commit
e64a89990d
1 changed files with 11 additions and 4 deletions
|
|
@ -7,6 +7,9 @@ A dynamic family
|
|||
|
||||
In this section we will learn how to create a dynamically built family.
|
||||
|
||||
In a dynamically built family, instead of duplicating the definition of
|
||||
identical variables in several families, they can be generated automatically.
|
||||
|
||||
.. prerequisites:: Reminder
|
||||
|
||||
We handled the HTTPS mode in the previous section. But there's more modes to handle.
|
||||
|
|
@ -144,9 +147,6 @@ This identifier is a parameter that enables us to create two families named `htt
|
|||
socks_proxy:
|
||||
description: "SOCKS Proxy"
|
||||
|
||||
.. note:: The declaration syntax used is the :term:`Jinja <jinja>` templating syntax,
|
||||
Jinja which is widely used in python.
|
||||
|
||||
.. attention:: Be careful when choosing your identifiers items: pay attention that the family
|
||||
that will be dynamically created has not been declared before in some other
|
||||
YAML structure file.
|
||||
|
|
@ -155,6 +155,11 @@ This identifier is a parameter that enables us to create two families named `htt
|
|||
build a `https_proxy` family and if this familiy already exists,
|
||||
then rougail will raise a family/variable override warning.
|
||||
|
||||
When choosing a name,
|
||||
|
||||
- rougail will put it in lowercase
|
||||
- only ASCII and `_` characters are allowed.
|
||||
|
||||
When we launch the rougail command line, we can have a look at the concrete families and variables that have appear:
|
||||
|
||||
.. code-block:: text
|
||||
|
|
@ -186,6 +191,8 @@ We can see that the dynamic family has created:
|
|||
as we wanted, containing an address and a port.
|
||||
|
||||
|
||||
.. todo:: déplacer ce hidden dans une autre page
|
||||
|
||||
.. _conditional_hidden_family:
|
||||
|
||||
A conditional hidden familiy
|
||||
|
|
@ -248,7 +255,7 @@ it uses `use_for_https` variable:
|
|||
|
||||
.. keypoints:: Key points
|
||||
|
||||
- We now know what a generic family is, with its identifier.
|
||||
- We now know what a dynamic family is, with its identifier.
|
||||
- we now how to create default values for a variable that is calculated
|
||||
because it retrieves the value of another variable.
|
||||
- we know how to hide conditionaly a family with the same mechanism,
|
||||
|
|
|
|||
Loading…
Reference in a new issue