![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ansible 学习
爱吃鱼虾
这个作者很懒,什么都没留下…
展开
-
python ansible使用(2)playbook
# vim playbook.yml #内容如下:---- hosts: all remote_user: "{{remote_user}}" #become: yes # 全局设置切换用户 #become_method: su #become_user: root #gather_facts: false tasks: # gather_facts: 默认true;ansible的变量,例如ansible_distribution; # ...原创 2021-09-07 18:06:34 · 328 阅读 · 0 评论 -
python ansible使用(1)ansible-api
python2.7.5 ansible==2.7.0# -*- coding:utf8 -*-import osimport sysimport logging# from collections import namedtuplefrom ansible.vars.manager import VariableManagerfrom ansible.inventory.manager import InventoryManagerfrom ansible.parsing....原创 2021-09-07 17:59:20 · 1380 阅读 · 1 评论 -
python ansible api 初次连接报错
fatal: [xxx.xxx.xxx.xxx]: FAILED! => {"failed": true, "msg": "Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this. Please a...转载 2018-06-01 16:49:02 · 659 阅读 · 0 评论