4篇 ansible related articles

ansible yum 安装慢的问题解决

使用ansible yum 模块安装软件时,可能会碰到执行非常慢的情况。

- name: install rpms
  yum:
    name:
      - etcd
    state: latest
    disablerepo: "*"
    enablerepo: some

原因可能是/etc/yum.conf配置的默认yum源响应非常慢,甚至不可达。

More ~

First start ansible on macos

I installed the ansible via pip install, and there are several issues here:

where is the config

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
More ~