Ansible-ToWer图形化界面安装
1、安装环境
CentOS Linux release 7.8.2003 (Core)【7.4+】
最小4G内存,20G磁盘
系统版本低于7.4无法正常安装,请先升级版本到7.4以上
系统内存低于4G无法正常安装
2、安装Ansible
[root@localhost ~]#yum install epel-release -y
[root@localhost ~]#yum install ansible -y
3、安装完确认Ansible版本
ansible --version
ansible 2.9.15
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.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.5 (default, Nov 16 2020, 22:23:17) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
4、Tower 下载安装,修改inventory文件
- 下载后上传到服务器
- 解压:
tar -zxvf ansible-tower-setup-bundle-3.6.4-1.el7.tar.gz
- 进入文件夹
cd /root/ansible-tower-setup-bundle-3.6.4-1
[root@bogon ansible-tower-setup-bundle-3.6.4-1]# ls
backup.yml bundle group_vars install.yml inventory licenses README.md rekey.yml restore.yml roles setup.sh
- 修改inventory文件相关内容
vi inventory
[tower]
localhost ansible_connection=local
[database]
[all:vars]
admin_password='123'
pg_host='127.0.0.1'
pg_port='5432'
pg_database='tower'
pg_username='ansible'
pg_password='ansible'
5、安装配套软件
yum -y install vim curl postgresql
mkdir /tmp/tower && cd /tmp/tower
mkdir -p /var/log/tower
6、启动
[root@bogon ansible-tower-setup-bundle-3.6.4-1]# ./setup.sh
注意启动日志中的报错信息,按照提示内容解决相关问题即可。