[tutorial v1.1_120] Disabled a variable when an other variable are disabled (config and doc)

This commit is contained in:
egarette@silique.fr 2026-03-09 09:12:52 +01:00
parent d7b6de6ba4
commit 792327abd4
2 changed files with 30 additions and 43 deletions

View file

@ -1,9 +1,9 @@
- [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md) - [Summary](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/branch/1.1/README.md)
- [[tutorial v1.1_111] A boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_111/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_112~1..v1.1_112)) - [[tutorial v1.1_112] A Jinja conditional disabled boolean variable](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_120~1..v1.1_120))
# [tutorial v1.1_112] A Jinja conditional disabled boolean variable # [tutorial v1.1_120] Disabled a variable when an other variable are disabled
[Read the tutorial "A Jinja conditional disabled boolean variable" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#a-jinja-conditional-disabled-boolean-variable) [Read the tutorial "Disabled a variable when an other variable are disabled" in the documentation](https://pedago.gwenaelremond.fr/bribes/rougail/tutorial/jinja.html#disabled-a-variable-when-an-other-variable-are-disabled)
## Screenshot ## Screenshot
@ -29,7 +29,7 @@ pip install rougail-cli rougail-output-exporter rougail-output-doc rougail-user-
Then switch to the tutorial page: Then switch to the tutorial page:
```shell ```shell
git switch --detach v1.1_112 git switch --detach v1.1_120
``` ```
## Structure ## Structure
@ -37,18 +37,18 @@ git switch --detach v1.1_112
<p> <p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./">.</a><br/> <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/">firefox</a><br/> ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/00-proxy.yml">00-proxy.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/10-manual.yml">10-manual.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/20-manual.yml">20-manual.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/20-manual.yml">20-manual.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/30-auto.yml">30-auto.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/30-auto.yml">30-auto.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/> │   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/">types</a><br/> └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/proxy/">proxy</a><br/>     └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/proxy/00_type.yml">00_type.yml</a><br/>         └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/proxy/00_type.yml">00_type.yml</a><br/>
<br/><br/></p> <br/><br/></p>
Contents of the firefox/55-proxy_dns_socks5.yml file Contents of the firefox/55-proxy_dns_socks5.yml file
@ -63,7 +63,7 @@ proxy_dns_socks5:
default: false default: false
disabled: disabled:
jinja: |- jinja: |-
{{ _.proxy_mode != "Manual proxy configuration" or _.manual.socks_proxy.version == 'v4' }} {{ _.manual.socks_proxy.version is propertyerror or _.manual.socks_proxy.version == 'v4' }}
return_type: boolean return_type: boolean
description: |- description: |-
if "_.proxy_mode" is not "Manual proxy configuration" if "_.proxy_mode" is not "Manual proxy configuration"
@ -138,19 +138,6 @@ rougail -m firefox/ --types types/proxy -o doc
| **<a id="proxy_dns_socks5" name="proxy_dns_socks5">proxy_dns_socks5</a>**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Use proxy DNS when using SOCKS v5.<br/>**Default**: false<br/>**Disabled**: if "[Configure Proxy Access to the Internet](#proxy_mode)" is not "Manual proxy configuration"<br/>or "[SOCKS host version used by proxy](#manual.socks_proxy.version)" is "v4" | | **<a id="proxy_dns_socks5" name="proxy_dns_socks5">proxy_dns_socks5</a>**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` *`disabled`* | Use proxy DNS when using SOCKS v5.<br/>**Default**: false<br/>**Disabled**: if "[Configure Proxy Access to the Internet](#proxy_mode)" is not "Manual proxy configuration"<br/>or "[SOCKS host version used by proxy](#manual.socks_proxy.version)" is "v4" |
***
### Let's generate the changelog
```shell
rougail -m firefox/ --types types/proxy -o doc --doc.contents changelog --doc.changelog.previous_json_file previous.yml
```
#### Modified variable
| Variable | Description |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **<a id="proxy_dns_socks5" name="proxy_dns_socks5">proxy_dns_socks5</a>**<br/>[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `mandatory` <ins>*`disabled`*</ins> | Use proxy DNS when using SOCKS v5.<br/>**Default**: false<br/>**Disabled**: <ins>if "[Configure Proxy Access to the Internet](#proxy_mode)" is not "Manual proxy configuration"<br/>or "[SOCKS host version used by proxy](#manual.socks_proxy.version)" is "v4"</ins> |
*** ***
## User datas ## User datas
@ -262,4 +249,4 @@ rougail -m firefox/ --types types/proxy -u yaml -yf config/04/config.yml
*** ***
- [[tutorial v1.1_120] Disabled a variable when an other variable are disabled](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_120~1..v1.1_120)) - [[tutorial v1.1_130] A variable in avanced mode](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_130/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_130~1..v1.1_130))

View file

@ -1,14 +1,14 @@
<p> <p>
<a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./">.</a><br/> <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./">.</a><br/>
├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/">firefox</a><br/> ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/">firefox</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/00-proxy.yml">00-proxy.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/00-proxy.yml">00-proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/10-manual.yml">10-manual.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/10-manual.yml">10-manual.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/20-manual.yml">20-manual.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/20-manual.yml">20-manual.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/30-auto.yml">30-auto.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/30-auto.yml">30-auto.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/40-no_proxy.yml">40-no_proxy.yml</a><br/>
│   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/> │   ├── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/50-prompt_authentication.yml">50-prompt_authentication.yml</a><br/>
│   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/> │   └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./firefox/55-proxy_dns_socks5.yml">55-proxy_dns_socks5.yml</a><br/>
└── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/">types</a><br/> └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/">types</a><br/>
    └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/proxy/">proxy</a><br/>     └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/proxy/">proxy</a><br/>
        └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_112/./types/proxy/00_type.yml">00_type.yml</a><br/>         └── <a href="https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_120/./types/proxy/00_type.yml">00_type.yml</a><br/>
<br/><br/></p> <br/><br/></p>