Contents
  1. 1. 离线安装

离线安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mkdir -p /tmp/ansible-offline
cd /tmp/ansible-offline

pip3 download ansible-core -d ./pkgs \
--python-version 38 \
--only-binary=:all:
tar zcf ansible-offline.tar.gz pkgs

cd /tmp
tar zxf ansible-offline.tar.gz
cd pkgs
python3 -m pip install --user --no-index --find-links=. ansible-core


ansible --version

ansible.cfg(当前目录优先):

1
2
3
4

[defaults]
host_key_checking = False
remote_user = hadoop