ansible碎碎念

Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please add this host’s fingerprint to your known_hosts file to
manage this host.

解决方法:

export ANSIBLE_HOST_KEY_CHECKING=False

2. 如何生成user模块需要的password

3. 只指定一台主机执行

4. ansible手动指定密码

5. ControlPersist自动登陆

Ansible配置文件里面的选项,默认开启,这样,在60s内不用重复输入密码。SSH版本必须是5.6或以上版本才可使用ControlPersist特性。

6. 获取IP地址

7. {“changed”: false, “msg”: “Authentication or permission failure. In some cases, you may have been able to authenticate and did not have permissions on the target directory. Consider changing the remote tmp path in ansible.cfg to a path rooted in \”/tmp\”

8. Timeout (12s) waiting for privilege escalation prompt

  1. 带上-K参数

  2. -c paramiko

  3. 格式化 ansible stdout 的输出

Original: https://www.cnblogs.com/ivictor/p/10387663.html
Author: iVictor
Title: ansible碎碎念

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/598950/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球