tar zxvf ansible-tower-setup-bundle-3.8.6-1.tar.gz
cd ansible-tower-setup-bundle-3.8.6-1
vi inventory #第9、16行添加密码
./setup.sh #安装部署
localhost:80 访问
#破解
#备份licensing.py
cp /var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/utils/licensing.py{,.bak}
#编辑licensing.py,将文件中函数语句替换为以下函数语句
def validate(self):
attrs = copy.deepcopy(self._attrs)
attrs.update(dict(subscription_name=‘Ansible Tower Crack’, license_type=‘enterprise’, valid_key=True))
if Host:
current_instances = Host.objects.active_count()
else:
current_instances = 0
available_instances = 99999
attrs['current_instances'] = current_instances
attrs['available_instances'] = available_instances
free_instances = (available_instances - current_instances)
attrs['free_instances'] = max(0, free_instances)
attrs['license_date'] = 2556115199
license_date = attrs['license_date']
current_date = int(time.time())
time_remaining = license_date - current_date
attrs['time_remaining'] = time_remaining
attrs['grace_period_remaining'] = time_remaining
attrs['compliant'] = bool(time_remaining > 0 and free_instances >= 0)
attrs['date_warning'] = bool(time_remaining < self.SUBSCRIPTION_TIMEOUT)
attrs['date_expired'] = bool(time_remaining <= 0)
return attrs
#重启ansible-tower
systemctl stop ansible-tower.service
systemctl start ansible-tower.service