gpt4 book ai didi

ansible - 如何为分子测试指定Vault密码文件?

转载 作者:行者123 更新时间:2023-12-02 14:07:29 24 4
gpt4 key购买 nike

使用分子运行测试时:

molecule tests

并且某些文件受 ansible vault 保护,必须指定 --vault-password-file 以提供解密其内容的密码。

虽然可以通过聚合来做到这一点

 molecule converge -- --vault-password-file ~/.vault.txt

分子测试失败

 $ molecule test -- --vault-password-file ~/.vault.txt
Usage: molecule test [OPTIONS]
Error: Got unexpected extra arguments (--vault-password-file ~/.vault.txt)

最佳答案

使用ANSIBLE_VAULT_PASSWORD_FILE环境变量如下:

ANSIBLE_VAULT_PASSWORD_FILE=$HOME/.vault.txt molecule test

将绕过分子参数解析逻辑并让ansible知道保管库密码所在的位置。

关于ansible - 如何为分子测试指定Vault密码文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54124073/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com