环境centos7.5+ansible
一、下载epel仓库
cd /etc/yum.repos.d
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -ivh epel-release-latest-7.noarch.rpm --force
yum update -y
yum clean all
yum makecache
二、安装ansible-tower
1、下载ansible-tower
官网地址:Index of /ansible-tower/setup
我是centos 7.5的系统,适合这个版本,7.8以上可以用最新版的ansible-tower
wget https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-3.7.0-4.tar.gz
tar -zxvf ansible-tower-setup-3.7.0-4.tar.gz
cd ansible-tower-setup-3.7.0-4
2、修改web参数
vim inventory
修改以下4处即可
mkdir -p /var/log/tower # 创建日志目录,要不然安装的时候报错
3、运行./setup.sh
如遇到错误 说明是ansible-tower版本错误,更换合适的版本即可(我是一个个试的……)
TASK [config_dynamic : Set database to internal or external] *****************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "template error while templating string: no filter named 'match'. String: {{ ( (pg_host is not defined or pg_host == '' or pg_host == '127.0.0.1') or (pg_host | match('/.*')) ) | ternary('internal', 'external') }}"}
PLAY RECAP *******************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=9 rescued=0 ignored=0
———
三、登陆192.168.31.252,默认用户名admin
第一次登陆会让你申请一个序列号,注册Download the Red Hat Ansible Automation Platform 60-day trial红帽子会员申请即可
No Comments