[tutorial Ansible 2.0] a leadership family
Apero configuration =================== Add access variables (login and password) --- env_apero: access: - login: srep password: oIJuheu27__u2 - login: snom password: oIJuheu27__u2 Examples of Ops inventory file ============================== 1/ VALID: 2/ INVALID, login and password are mandatory if a list is set: --- env_apero: access: - login: srep - login:
This commit is contained in:
parent
fd48879373
commit
9d6cacfcf6
2 changed files with 38 additions and 0 deletions
19
Ansible/asserts/apero.yml
Normal file
19
Ansible/asserts/apero.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
- name: Test variable env_apero.access
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- env_apero.access is defined
|
||||
- env_apero.access | type_debug == 'list'
|
||||
fail_msg: "env_apero.access n'existe pas ou est de mauvais type !"
|
||||
when: env_apero is defined
|
||||
- name: Test variable env_apero.access.login env_apero.access.password
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- access is mapping
|
||||
- access.login is defined
|
||||
- access.password is defined
|
||||
fail_msg: "La variable n'existe pas ou est de mauvais type !"
|
||||
loop: "{{ env_apero.access }}"
|
||||
loop_control:
|
||||
loop_var: access
|
||||
when: env_apero is defined and env_apero.access is defined
|
19
doc.md
19
doc.md
|
@ -19,6 +19,21 @@ to make network connections to network services outside its own network.
|
|||
| **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/>**Default:** 3128 |
|
||||
| **no_proxy**<br/>`multiple`<br/>**Type:** [`domainname`](https://forge.cloud.silique.fr/stove/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) | Exclude proxy server.<br/>Network address(es), network address range(s) and domains to exclude from using the proxy when initiating connection(s). .<br/>**Examples:** 192.168.1.1, 192.168.10.0/24, www.silique.fr, .internal.silique.fr |
|
||||
|
||||
## Apero service (env_apero)
|
||||
|
||||
### Add access informations to Apero service (env_apero.access)
|
||||
|
||||
To access to Apero service, other services need an account and
|
||||
a password.
|
||||
|
||||
|
||||
This family is a leadership.
|
||||
|
||||
| Parameter | Comment |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **login**<br/>`multiple`<br/>**Type:** [`unix_user`](https://forge.cloud.silique.fr/stove/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) | Login name.<br/>The account name is typically the name of foreign services. .<br/>**Example:** srep |
|
||||
| **password**<br/>`mandatory`<br/>**Type:** [`secret`](https://forge.cloud.silique.fr/stove/rougail/src/branch/main/doc/variable/README.md#le-type-de-la-variable) | Password. |
|
||||
|
||||
# Example with mandatories variables
|
||||
|
||||
```
|
||||
|
@ -37,4 +52,8 @@ env_proxy:
|
|||
- 192.168.10.0/24
|
||||
- www.silique.fr
|
||||
- .internal.silique.fr
|
||||
env_apero:
|
||||
access:
|
||||
- login: srep
|
||||
password: xxx
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue