docs(file-naming-convention): file naming for dynamic families
This commit is contained in:
parent
bc509a6fcf
commit
fade50baf5
3 changed files with 28 additions and 8 deletions
|
|
@ -57,3 +57,19 @@ The regular expression that validates our file naming policy is:
|
||||||
|
|
||||||
You can see that it is preferable to only use lowercase ASCII letters, numbers and the `"_"` (undescore) character.
|
You can see that it is preferable to only use lowercase ASCII letters, numbers and the `"_"` (undescore) character.
|
||||||
The snake case typographic convention is therefore used.
|
The snake case typographic convention is therefore used.
|
||||||
|
|
||||||
|
Dynamically built family naming policy
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
Regarding the :ref:`dynamically built families <dynfam>` the file naming policy is slightly different.
|
||||||
|
ASCII letters, numbers and the `"_"` (undescore) character are allowed, that is we allow uppercase characters.
|
||||||
|
|
||||||
|
Why allowing uppercase letters for a dynamic familly?
|
||||||
|
Because we have choosed to write :term:`identifiers <identifier>` in uppercase.
|
||||||
|
|
||||||
|
.. note:: The identifier is in uppercase, but the dynamic familly name is in lowercase.
|
||||||
|
You can then choose the corresponding structure filenames in lowercase.
|
||||||
|
|
||||||
|
.. seealso:: For more information about dynamic famillies, please have a look at the
|
||||||
|
:ref:`dynamic family tutorial <dynfam>`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,6 @@ Now with identifiers, we have the ability to declare our families this way:
|
||||||
description: "{{ identifier }} port"
|
description: "{{ identifier }} port"
|
||||||
...
|
...
|
||||||
|
|
||||||
.. index:: identifier
|
|
||||||
|
|
||||||
.. type-along:: What is exactly an identifier?
|
.. type-along:: What is exactly an identifier?
|
||||||
|
|
||||||
If you used the YAML declaration tool named `Ansible <https://docs.ansible.com>`_,
|
If you used the YAML declaration tool named `Ansible <https://docs.ansible.com>`_,
|
||||||
|
|
@ -275,6 +273,9 @@ We can see that the dynamically built families that have been created:
|
||||||
|
|
||||||
and, as we expected, containing an address and a port.
|
and, as we expected, containing an address and a port.
|
||||||
|
|
||||||
|
.. seealso:: Have a look at the :ref:`file naming convention <filenamingconvention>`
|
||||||
|
In order to choose a proper name to a structure file or a dynamic familiy name.
|
||||||
|
|
||||||
A conditional disabled variable with dynamic identifier
|
A conditional disabled variable with dynamic identifier
|
||||||
--------------------------------------------------------
|
--------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,8 @@ Please unroll the "Solution" widget to see our solution:
|
||||||
:language: yaml
|
:language: yaml
|
||||||
:caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable
|
:caption: The :file:`firefox/50-prompt_authentication.yml` a conditional disabled boolean variable
|
||||||
|
|
||||||
- Here we choosed to name the new structure file `firefox/50-prompt_authentication.yml`, the file containing the two variables definition,
|
- Here we choosed to name the new structure file `firefox/50-prompt_authentication.yml`,
|
||||||
|
the file containing the `prompt_authentication` variable definition,
|
||||||
- this variable is true by default,
|
- this variable is true by default,
|
||||||
- this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`.
|
- this variable shall be :term:`disabled` if the `proxy_mode` variable is set to `"No proxy"`.
|
||||||
|
|
||||||
|
|
@ -93,11 +94,13 @@ What do we want to be implemented
|
||||||
|
|
||||||
.. exercise:: Exercice
|
.. exercise:: Exercice
|
||||||
|
|
||||||
- choice a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
You need to think about:
|
||||||
- define an appropriate variable name # FIXME pas de convention pour le nom des familles/variables ?
|
|
||||||
- the description will be the Firefox description
|
- the choice of a file name that respect the :ref:`file naming and organizing convention <namingconvention>`
|
||||||
- the variable is a boolean with the default value `false` (unchecked option)
|
- in order to define an appropriate variable name,
|
||||||
- the variable is only available with the "Manual proxy configuration" proxy mode and when the proxy socks version is not v4.
|
- the `description` parameter will be the Firefox description,
|
||||||
|
- the variable is a boolean with the default value `false` (unchecked option),
|
||||||
|
- the variable is only available with the `"Manual proxy configuration"` proxy mode and when the proxy socks version is not v4.
|
||||||
|
|
||||||
|
|
||||||
Our solution
|
Our solution
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue