-
Could you please help figure out why sub-variables don't work in the case below? 10:47:32 > kapitan --version
0.29.5 10:39:39 > cat ansible.yml
ansible_creds:
user: user
password: password kapitan refs --write gkms:passwords/lab-bm -t c01 -f ansible.yml 10:44:45 > kapitan refs --reveal --ref-file refs/passwords/lab-bm
ansible_creds:
user: user
password: password # imported to target
parameters:
ansible_user: ${gkms:passwords/lab-bm@ansible_creds.user||randomstr:32|base64}
ansible_password: ${gkms:passwords/lab-bm@ansible_creds.password||randomstr:32|base64} 10:45:56 > kapitan compile -t c01
Inventory reclass error: -> c01
Cannot resolve ${gkms:passwords/lab-bm@ansible_creds.user||randomstr:32|base64}, at ansible_user, in yaml_fs:///xxx/classes/env/lab.yml
Cannot resolve ${gkms:passwords/lab-bm@ansible_creds.password||randomstr:32|base64}, at ansible_password, in yaml_fs:///xxx/classes/env/lab.yml
-> c01
Cannot resolve ${gkms:passwords/lab-bm@ansible_creds.user||randomstr:32|base64}, at ansible_user, in yaml_fs:///xxx/classes/env/lab.yml
Cannot resolve ${gkms:passwords/lab-bm@ansible_creds.password||randomstr:32|base64}, at ansible_password, in yaml_fs:///xxx/classes/env/lab.yml |
Beta Was this translation helpful? Give feedback.
Answered by
owlzq1
Mar 24, 2021
Replies: 1 comment
-
That's the wrong syntax for secrets. It should be ?{gkms:path} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
adrianchifor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's the wrong syntax for secrets. It should be ?{gkms:path}