rougail-tutorials/Rougail/socle/04-apero.yml
Emmanuel Garette 0adf7aea25 [tutorial Rougail 2.2] calculed variable
Apero configuration
===================

Get password from an user
2023-12-18 11:34:33 +01:00

43 lines
1 KiB
YAML

---
version: '1.0'
env_apero:
description: Apero service
access:
description: Add access informations to Apero service
help: |
To access to Apero service, other services need an account and
a password.
type: leadership
login:
description: Login name
help: |
The account name is typically the name of foreign services.
type: unix_user
multi: true
test:
- srep
password:
description: Password
type: secret
env_srep:
description: SREP service
apero_user:
description: Account to access to Apero service
type: choice
choices:
type: variable
variable: socle.env_apero.access.login
test:
- srep
apero_password:
type: secret
hidden: true
default:
type: jinja
jinja: |
{% for value in socle.env_apero.access.login %}
{% if value == socle.env_srep.apero_user %}
{{ socle.env_apero.access.password[loop.index0] }}
{% endif %}
{% endfor %}