我尝试编写一个 Ansible yml,它从加密的保管库文件中读取根密码,然后将其传递给 become_pass:
- hosts: sirius
remote_user: ansusr
become: yes
vars_files:
- vault_vars.yml
become_pass: "{{ root_pass_sirius }}"
但这失败了:错误!'become_pass' 不是 Play 的有效属性
但为什么 ?- 根据 Ansible 文档,这是一个有效的命令。