ansible-tower-setup-bundle-3.8.6-1安装和魔法

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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值