[tutorial Ansible 2.2] calculed variable

Apero configuration
===================

Get password from an user
This commit is contained in:
egarette@silique.fr 2023-12-18 11:34:34 +01:00
parent 0adf7aea25
commit 00a8e0fe00
2 changed files with 11 additions and 0 deletions

View file

@ -7,3 +7,9 @@
- name: Display variable env_proxy_all.no_proxy
ansible.builtin.debug:
var: env_proxy_all.no_proxy
- name: Display variable env_srep_all.apero_user
ansible.builtin.debug:
var: env_srep_all.apero_user
- name: Display variable env_srep_all.apero_password
ansible.builtin.debug:
var: env_srep_all.apero_password

View file

@ -0,0 +1,5 @@
---
env_srep_all:
apero_user: "{{ env_srep.apero_user }}"
apero_password: "{{ (env_apero.access | selectattr('login', 'equalto', env_srep.apero_user))[0].password }}"