install ansible2.10 for centos7

环境准备


# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)


# python
Python 3.7.11 (default, Jul 31 2022, 16:12:35) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.

# 记得更新 下面2个组件
pip install --upgrade setuptools

python3 -m pip install --upgrade pip
# 安装
pip install ansible 

# 查看效果
# ansible --version
[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.7.11 (default, Jul 31 2022, 16:12:35) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-44)]. This feature will be removed from ansible-core in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ansible [core 2.11.12] 
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/python37/lib/python3.7/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /bin/ansible
  python version = 3.7.11 (default, Jul 31 2022, 16:12:35) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
  jinja version = 3.1.2
  libyaml = True

相关文章

----name:setpublickeyonremotehosts&setreomtehostssud...
环境准备#cat/etcedhat-releaseCentOSLinuxrelease7.9.2009(...
准备好环境,在安装之前请先了解openshift提供的ansible有大...
Ansible:运维工作:系统安装(物理机、虚拟机)-->程序包...
ansible与salt对比相同都是为了同时在多台机器上执行相同的命...
[root@node1playbook]#catnginx.yml-hosts:test\\主...