使用ansible yum 模块安装软件时,可能会碰到执行非常慢的情况。
- name: install rpms
yum:
name:
- etcd
state: latest
disablerepo: "*"
enablerepo: some
原因可能是/etc/yum.conf
配置的默认yum源响应非常慢,甚至不可达。
4篇 ansible related articles
使用ansible yum 模块安装软件时,可能会碰到执行非常慢的情况。
- name: install rpms
yum:
name:
- etcd
state: latest
disablerepo: "*"
enablerepo: some
原因可能是/etc/yum.conf
配置的默认yum源响应非常慢,甚至不可达。
- name: set hostname
hostname:
name: "pardus"
ansible execute failed on aarch64 platform, to fix this:
- name: set hostname
hostname:
name: "pardus"
use: systemd
append use: systemd
.
一种办法是 修改 ansible.cfg 的 #host_key_checking= False
取消注释
另一种办法是 执行 export ANSIBLE_HOST_KEY_CHECKING=False
I installed the ansible via pip install
, and there are several issues here:
Here you should create a file ~/.ansible.cfg
[defaults]
inventory =~/.ansible/hosts
sudo_user=root
remote_port=22
host_key_checking=False
remote_user=root
log_path=~/.ansible/log/ansible.log
module_name=command
private_key_file=~/.ssh/id_rsa