Centos 7 环境下Ansible、Ansible Tower 下载 安装 访问 破解
1、安装环境
CentOS Linux release 7.8.2003 (Core)
最小4G内存,20G磁盘
2、安装Ansible
[root@localhost ~]#yum install epel-release -y
[root@localhost ~]#yum install ansible -y
3、安装完确认Ansible版本
[root@localhost awx]# ansible --version
ansible 2.9.10
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, Apr 2 2020, 13:16:51) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
4、Tower 下载安装,修改inventory文件
[root@localhost ~]#cd /opt
[root@localhost opt]#wget http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz
[root@localhost opt]#tar -xf ansible-tower-setup-latest.tar.gz
[root@localhost awx]# cd /opt/ansible-tower-setup-3.7.1-1/
[root@localhost ansible-tower-setup-3.7.1-1]# ls
backup.yml install.yml licenses rekey.yml roles
group_vars inventory README.md restore.yml setup.sh
[root@localhost ansible-tower-setup-3.7.0-4]# vim inventory
admin_password='admin'
pg_username='admin'
pg_password='admin' ##修改这三条
安装配套软件
yum -y install vim curl postgresql
mkdir /tmp/tower && cd /tmp/tower
mkdir -p /var/log/tower
启动
[root@localhost ansible-tower-setup-3.7.0-4]#./setup.sh
**若无网络问题,即可安装成功。**
5、访问Ansible Tower
在浏览器输入地址格式:https://本地IP/#/login
用户名和密码都是admin,如上面inventory文件设置所示
6、破解Tower 需要授权文件和受管理的服务器只有10台问题
**执行命令:**
touch /var/lib/awx/i18n.db && ansible-tower-service restart
注意:本博客中所有软件都是最新版本的,这方法只适用3.7.0-4、3.7.1-1 中破解成功,其他版本未验证。
其次新版的ansible tower 需要centos7.8及以上的系统,已经内存必须高于4g,否则安装脚本各种报错
相关报错解决:
1.内存不只(最小4g.建议给4g以上)
fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “This machine does not have sufficient RAM to run Ansible Tower.”}
--------------------当你发现自己突然嫉妒起其他人时,就请安静下来学习吧!--------------------