下面的代码可以调用puppet-agent
安装角色,这适用于Linux,但是,当我使用become
机器时,它会给become
行带来错误。
如何为Linux和Windows更新下面的代码。包括成为为Linux和排除become
的窗口?
---
- hosts: all
become: yes
roles:
- puppet-agent
错误消息
fatal: [winhost]: FAILED! => {"msg": "The powershell shell family is
incompatible with the sudo become plugin"}
发布于 2021-03-22 18:31:25
值得尝试的是,尽管我没有可用的Windows来测试它,但如果您在Windows上,则完全omit
become
指令:
- hosts: all
gather_facts: yes
roles:
- role: puppet-agent
become: "{{ true if ansible_system == 'Linux' else omit }}"
https://stackoverflow.com/questions/66715499
复制相似问题