Ansible 2.9.10错误:“;味精&引用;指定的BENG方法无效,找不到匹配的插件:';禁用';
在运行YML Ansible Playbook时,我得到以下错误Ansible 2.9.10错误:“;味精&引用;指定的BENG方法无效,找不到匹配的插件:';禁用';,ansible,ansible-2.x,Ansible,Ansible 2.x,在运行YML Ansible Playbook时,我得到以下错误 fatal: [192.168.0.120]: FAILED! => {"msg": "Invalid become method specified, could not find matching plugin: 'disable'. Use `ansible-doc -t become -l` to list available plugins."} 我的Ansible文件很简
fatal: [192.168.0.120]: FAILED! => {"msg": "Invalid become method specified, could not find matching plugin: 'disable'. Use `ansible-doc -t become -l` to list available plugins."}
我的Ansible文件很简单
- name: CONFIG FGT HOSTNAME AND INTERFACE
hosts: FortiManager
connection: httpapi
gather_facts: False
tasks:
- name: CONFIRM AUTHORIZE UNAUTHORIZED FMG DEVICE
pause:
prompt: "Do you want to add FGT-ISFW as an authorized device?"
echo: "yes"
我运行了“ansible doc-t been-l”命令,但是我没有看到任何与msg消息相关的内容,也不确定下一步该怎么做
# ansible-doc -t become -l enable
ksu Kerberos substitute user
pbrun PowerBroker run
enable Switch to elevated permissions on a network device
sesu CA Privileged Access Manager
pmrun Privilege Manager run
runas Run As user
sudo Substitute User DO
su Substitute User
doas Do As user
pfexec profile based execution
machinectl Systemd's machinectl privilege escalation
dzdo Centrify's Direct Authorize
有什么建议吗?我正在运行Ansible 2.9.10
# ansible --version
ansible 2.9.10
config file = /home/fortinet/downloads/FMG-Ansible-Testing/ansible.cfg
configured module search path = [u'/opt/ansible/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15rc1 (default, Nov 12 2018, 14:31:15) [GCC 7.3.0]
Q:“失败!=>{“msg”:“指定的变成方法无效,找不到匹配的插件:”禁用。}”
答:根据错误信息,它是A。没有禁用。例如,这是错误的
been_方法:禁用
禁用使用。例如(这是默认设置)
been:false
最困难的部分是找到错误配置的来源。你正在寻找。看看配置
shell>ansible配置转储--仅更改
如果没有,请查看目录、组变量和主机变量。搜索成为方法如果在其中定义了“成为”方法,请检查这些位置中的任何一个:我现在正在查看。我是否缺少一些插件或什么?目录只有一个设备(Fortinet FortiManager)似乎不需要权限升级。默认值为been:false
。您可以安全地删除所有been_*configuration。谢谢。让我困惑的是这里没有“been”上面有关键字。它一定在某个地方。查看所有可能的来源。请参阅。我的主机文件中有:ansible\u network\u os=fortimanager ansible\u Been=no ansible\u Been\u method=disable