etcansibleansiblecfg 怎么跳过目标端的pam
可以通过修改ansible.cfg文件中的ssh_args参数来跳过目标端的pam。
在ansible.cfg文件中添加以下内容:
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o ControlPath=~/.ansible/cp/ansible-ssh-%h-%p-%r -q -tt -o PAMAuthentication=no
其中,-o PAMAuthentication=no参数表示跳过目标端的pam认证。保存文件后,重新运行ansible命令即可生效。
原文地址: http://www.cveoy.top/t/topic/b1gB 著作权归作者所有。请勿转载和采集!