美文网首页
Ansible及Ansible Tower安装破解

Ansible及Ansible Tower安装破解

作者: cyzyjin | 来源:发表于2020-08-07 12:14 被阅读0次

    yum源

    yum install epel-release -y
    

    Ansible安装

    关闭firewalld

    systemctl stop firewalld
    systemctl disable firewalld
    

    关闭selinux
    vim /etc/selinux/config
    vim> SELINUX=permissive

    setenforce 0
    

    ansible安装

    yum install ansible -y
    

    ansible-tower安装

    wget [https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz](https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz)​
    tar xzvf ansible-tower-setup-latest.tar.gz
    cd ansible-tower-setup-3.7.1-1/
    vim inventory
    

    <vim
    [all:vars]
    admin_password='admin'

    pg_host=''
    pg_port=''

    pg_database='awx'
    pg_username='awx'
    pg_password='admin'

    rabbitmq_port=5672
    rabbitmq_vhost=tower
    rabbitmq_username=tower
    rabbitmq_password='admin'
    rabbitmq_cookie=cookiemonster

    rabbitmq_use_long_name=false
    vim>

    ./setup.sh
    

    耐心等待安装

    Ansible-tower破解

    安装python3-pip和反汇编工具

    yum install python3-pip
    pip3 install uncompyle6
    

    注:破解无需导入license

    cd /var/lib/awx/venv/awx/lib/python3.6/site-packages/tower_license
    uncompyle6 __init__.pyc >__init__.py
    vim __init__.py
    

    找到def _generate_cloudforms_subscription(self):函数
    修改license_date变量的值为253370764800
    找到下个def _check_cloudforms_subscription(self):函数
    添加return True代码(如下图)


    微信图片_20200730134318.png

    重新编译一下

    python3 -m py_compile __init__.py
    python3 -O -m py_compile __init__.py
    

    重启服务

    ansible-tower-service restart
    

    完成
    在浏览器地址栏输入localhost访问
    账号:admin
    密码:admin

    相关文章

      网友评论

          本文标题:Ansible及Ansible Tower安装破解

          本文链接:https://www.haomeiwen.com/subject/rkjrrktx.html