ansible-tower装以及破解(亲测可用)

一、环境准备:
CentOS Linux release 7.5.1804 (Core)
主机地址:9.110.187.203
ansible版本:2.6.4
ansible-tower版本:3.2.6

[root@localhost ~]#yum -y install ansible

[root@localhost ~]# ansible --version

ansible 2.6.4

二、安装ansible-tower:

[root@localhost ~]#wget https://releases.ansible.com/ansible-tower/setup-bundle/ansible-tower-setup-bundle-3.2.6-1.el7.tar.gz

[root@localhost ~]#tar -zxvf ansible-tower-setup-bundle-3.2.6-1.el7.tar.gz

[root@localhost ~]#cd ansible-tower-setup-bundle-3.2.6-1.el7

修改配置文件inventory将里面所有的密码都修改为自己的密码,如下三处的标红地方:

[root@localhost ansible-tower-setup-bundle-3.2.6-1.el7]# pwd

/root/ansible-tower-setup-bundle-3.2.6-1.el7

image.png

[root@localhost ansible-tower-setup-bundle-3.2.6-1.el7]# ./setup.sh 

如果网络没有问题的话耐心等待安装完成即可.

安装完成没报错的话即可访问web页面:https://9.110.187.203/#/,默认初始页面如下:

image.png

默认用户为admin,密码为inventory文件admin_password字段配置的密码,我这里配置的密码也为admin.

导入license,没有的话,点击REQUEST LICENSE,去官方(https://www.ansible.com/license)申请免费试用,填写个人信息后(邮箱要填写正确,其他信息可随便填写)会把license发到填写的邮箱.

提交license并登录成功后默认初始页面如下:

image.png


[root@localhost ansible-tower-setup-bundle-3.2.6-1.el7]# cd /var/lib/awx/venv/awx/lib/python2.7/site-packages/tower_license

vi __init__.py将119行和120行修改为如下内容,特别需要注意格式,如下:

image.png

修改完重新编译一下:

[root@localhost  tower_license]# python -m py_compile __init__.py

[root@localhost  tower_license]# python -O -m py_compile __init__.py

重启服务:

[root@localhost  tower_license]# ansible-tower-service restart

重新打开settings–VIEW YOUR LICENSE,发现"Hosts Available"变成了9999999台,说明破解成功,如下:

image.png

猜你喜欢

转载自blog.51cto.com/shunzi115/2308081