更新:
我已将配置组织成基于角色的目录结构。其中一些角色具有包含加密文本的默认变量文件。这是一个经过简化且经过测试但失败的任务列表:
---
- name: 'Include some additional variables'
include_vars:
dir: "{{playbook_dir}}/roles/foo/defaults/vars"
tags: 'debug'
- name: 'Debug: display the variables'
debug:
msg: "{{item}}"
with_items:
- "{{encrypted_text_from_yml_file}}"
tags: 'debug'
- name: 'Deploy Foo plugins'
block:
- name: 'Transfer the folder to the application directory'
synchronize:
src: 'some_src_folder'
dest: "{{some_unencrypted_text_from_another_yml_file}}"
archive: false
recursive: true
tags: 'debug'
Run Code Online (Sandbox Code Playgroud)
但是,在执行我的剧本时,我看到以下错误:
TASK [<some_app> : Transfer the <some_folder> folder to the application directory] **********************************************************************************
fatal: [<some_hostname>]: FAILED! => {"failed": true, "msg": "Decryption failed (no vault secrets would found t
hat could decrypt)"}
Run Code Online (Sandbox Code Playgroud)
正在从密码文件中检索我的凭据。
我在变量包含之后立即抛出了一个调试任务,并显示了所有加密的变量。奇怪的是发生异常的任务块正在使用同步模块。甚至没有使用库中的变量......
知道如何解决这个问题吗?我增加了详细程度-vvvv,但没有看到任何明显的东西。
使用:ansible 2.4.0.0
| 归档时间: |
|
| 查看次数: |
40201 次 |
| 最近记录: |