在Amazon Linux 2上安装Ansible
首先
鉴于 Amazon Linux 的 EOL(已延长至 2020/12/31),我们决定将 Jenkins 服务器迁移到 Amazon Linux 2 !这篇文章记录了安装 Ansible 的步骤。(截至 2020/01/28)其他任务将在单独的条目中进行描述。
环境
$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
安装 epel
$ sudo amazon-linux-extras install epel
安装Ansible
$ sudo yum install ansible
确认安装
$ ansible --version
ansible 2.9.2
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ec2-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.16 (default, Dec 12 2019, 23:58:22) [GCC 7.3.1 20180712 (Red Hat 7.3.1-6)]