ansible

install

1
2
3
4
5
6
7
8
9
# (optional) install pip
python3 -m ensurepip --upgrade
python3 -m pip --version

# config pip source ( pip version > 10.0.0)
python3 -m pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

# install
python3 -m pip install ansible # or with '--user' which just install on current user

config

changed_when: false

The command and shell modules default to reporting changed: true because Ansible cannot know if the command modified the system. If you run a read-only command (like grep or df), you should use changed_when: false.