[tutorial Ansible 1.2] a port variable
Proxy configuration =================== Add the env_proxy.port variable --- env_proxy: host: proxy.example.net port: "3128" Examples of Ops inventory file ============================== 1/ INVALID only with rougail: --- env_proxy: host: proxy.example.net port: 3128 2/ INVALID, port is missing: --- env_proxy: host: proxy.example.net
This commit is contained in:
parent
dce9304b17
commit
2758bf6ec7
2 changed files with 9 additions and 0 deletions
|
@ -6,3 +6,9 @@
|
|||
- env_proxy.host is defined
|
||||
- env_proxy.host is string
|
||||
fail_msg: "La variable n'existe pas ou est de mauvais type !"
|
||||
- name: Test variable env_proxy.port
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- env_proxy.port is defined
|
||||
- env_proxy.port is string or env_proxy.port is integer
|
||||
fail_msg: "La variable n'existe pas ou est de mauvais type !"
|
||||
|
|
3
doc.md
3
doc.md
|
@ -16,12 +16,14 @@ to make network connections to network services outside its own network.
|
|||
| Parameter | Comment |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **host**<br/>`mandatory`<br/>**Type:** [`domainname`](https://forge.cloud.silique.fr/stove/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) | The proxy server’s address.<br/>Specifies the hostname of proxy server to enable proxy server access to all of your HTTP(s) requests. .<br/>**Example:** proxy.silique.fr |
|
||||
| **port**<br/>`mandatory`<br/>**Type:** [`port`](https://forge.cloud.silique.fr/stove/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) | The proxy server's port.<br/>**Example:** 3128 |
|
||||
|
||||
# Example with mandatories variables
|
||||
|
||||
```
|
||||
env_proxy:
|
||||
host: proxy.silique.fr
|
||||
port: '3128'
|
||||
```
|
||||
|
||||
# Example with all variables
|
||||
|
@ -29,4 +31,5 @@ env_proxy:
|
|||
```
|
||||
env_proxy:
|
||||
host: proxy.silique.fr
|
||||
port: '3128'
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue