docs(multi): add auto configuration variable
This commit is contained in:
parent
d339aebd63
commit
a2b02a8552
2 changed files with 57 additions and 0 deletions
|
|
@ -57,4 +57,5 @@ Let's dive into this **configuration options validation** use case.
|
|||
jinja
|
||||
customtype
|
||||
nullable
|
||||
multiple
|
||||
whatsnext
|
||||
|
|
|
|||
56
docs/tutorial/multiple.rst
Normal file
56
docs/tutorial/multiple.rst
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
Variable with multiple values
|
||||
================================
|
||||
|
||||
.. objectives:: Objectives
|
||||
|
||||
FIXME
|
||||
|
||||
.. prerequisites:: Prerequisites
|
||||
|
||||
- We assume that Rougail's library is :ref:`installed <installation>` on your computer.
|
||||
|
||||
- It is possible to retrieve the current state of the various Rougail files manipulated in this tutorial step
|
||||
by checking out the corresponding tag of the `rougail-tutorials` git repository.
|
||||
Each tag corresponds to a stage of progress in the tutorial.
|
||||
Of course, you can also decide to copy/paste or download the tutorial files contents while following the tutorial steps.
|
||||
|
||||
If you want to follow this tutorial with the help of the corresponding :tutorial:`rougail-tutorials git repository <src/branch/v1.1>`,
|
||||
this workshop page corresponds to the tags :tutorial:`v1.1_100 <src/tag/v1.1_100/README.md>` to :tutorial:`v1.1_111 <src/tag/v1.1_111/README.md>`
|
||||
in the repository.
|
||||
|
||||
::
|
||||
|
||||
git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git
|
||||
git switch --detach v1.1_100
|
||||
|
||||
.. type-along:: A web_address variable
|
||||
|
||||
A conditional disabled variable with type web_address
|
||||
-------------------------------------------------------------
|
||||
|
||||
Fist we need to add a variable as part of our use case with a type we haven't used yet, the `web_address` type.
|
||||
It is related to the automatic proxy configuration situation.
|
||||
Let's put it a new :file:`firefox/30-auto.yml` :term:`structure file`.
|
||||
Note that this variable has a :term:`disabled` property defined:
|
||||
|
||||
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_100/firefox/30-auto.yml
|
||||
:language: yaml
|
||||
:caption: The :file:`firefox/30-auto.yml` structure definition file with the `auto` variable
|
||||
|
||||
..
|
||||
%YAML 1.2
|
||||
---
|
||||
version: 1.1
|
||||
|
||||
auto:
|
||||
description: Automatic proxy configuration URL
|
||||
type: web_address
|
||||
disabled:
|
||||
variable: _.proxy_mode
|
||||
when_not: Automatic proxy configuration URL
|
||||
...
|
||||
|
||||
If the `proxy_mode` variable has the `"Automatic proxy configuration URL"` value, this `auto` variable is enabled.
|
||||
It is :term:`disabled` otherwise.
|
||||
|
||||
|
||||
Loading…
Reference in a new issue