安装 ansible tower 报错:

安装  ansible tower  报错:

 

  1. Failed to start supervisor.service: Unit not found.

 

 

安装步骤没有错:

使用yum命令安装(推荐)

$ sudo su - #切换为root用户

 

# yum install epel-release

# yum install -y supervisor

# systemctl enable supervisord # 开机自启动

# systemctl start supervisord # 启动supervisord服务

 

# systemctl status supervisord # 查看supervisord服务状态

# ps -ef|grep supervisord # 查看是否存在supervisord进程

 

 

但是运行: service supervisor restart    报错Failed to start supervisor.service: Unit not found

 

解决方法尝试:

[root@iz8vb6wnpf70v6mckovd7tz etc]# service supervisor restart 
Redirecting to /bin/systemctl restart supervisor.service 
Failed to restart supervisor.service: Unit not found. 


你这里就有问题了。你要是用 supervisord -c /etc/supervisord.conf 来启动进程,就不要用 services 来重启。 建议你 kill supervisord,再直接用 services 来启动 supervisord

 

 

 

  1. 报错:fatal: [localhost]: FAILED! => {"changed": false, "msg": "Could not find the requested service supervisord: host"}

解决方法:

安装:supervisor

   Yum 安装:

 

 yum –y install supervisor

 

另外手动下载源文件安装;

 

 

 

 

  1. 报错:fatal: [localhost]: FAILED! => {"changed": false, "cmd": "awx-manage migrate --noinput", "msg": "[Errno 2] 没有那个文件或目录",

尝试解决方法:

   TASK [awx_install : Migrate the Tower database schema (may take awhile when upgrading).] ***

操作报错  定位到   postgresql 是否安装完成测试一下

 

service postgresql-9.4 initdb

service postgresql-9.4 start

 

如果可以启动:

则测试是否可以创建连接:

# 创建用户 su - postgres psql CREATE ROLE awx CREATEDB PASSWORD 'admin' LOGIN; \q exit sed -i 's#peer#md5#g' /var/lib/pgsql/9.4/data/pg_hba.conf sed -i 's#ident#md5#g' /var/lib/pgsql/9.4/data/pg_hba.conf service postgresql-9.4 restart # 测试awx用户连接,输入密码连接,并创建数据库 psql -U awx -d postgres -h 127.0.0.1 create database awx; \q

 

 

 

 

4. fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "This machine does not have sufficient RAM to run Ansible Tower."}

Ansible Tower 官方提供手册:

安装要求 

 系统版本  Linux 7.4+

内存:  建议至少4G以上

Cpu  两个以上

解决方法:机器内存不足,增加内存

 

 

安装高版本Linux系统

配置较高性能

tower安装环境要求

  1. 操作系统:
    • Red Hat Enterprise Linux 7.4或更高版本64位
    • CentOS 7.4或更高版本64位
    • Ubuntu 14.04 LTS 64位
    • Ubuntu 16.04 LTS 64位
  2. 硬件:
    • 最少2个CPU
    • 最低4 GB RAM
    • 20 GB专用硬盘空间
  3. 软件环境:
    • Mozilla Firefox或Google Chrome版本浏览器
    • 运行Ansible Tower 3.2及更高版本需要PostgreSQL 9.6.X以上
    • 运行Ansible Tower版本3.2及更高版本需要Ansible 2.2 以上版本

tower 用到的组件:

  • postgres
  • memcached
  • rabbitmq
  • nginx
  • supervisord
  • uwsgi
  • django
  • celeryd


 

 

 

 

5.

TASK [postgres : create the postgres user and set the password] ******************************************************

fatal: [localhost]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result", "changed": false}

 

 

解决方法:

 

 

 

 

 

6. fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Your current version of Ansible (2.2.1.0) is too old for this version of Ansible Tower. Please upgrade."}

 

 

TASK [preflight : Preflight check - require new enough Ansible] ****************

fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Your current version of Ansible (2.2.1.0) is too old for this version of Ansible Tower. Please upgrade."}

 

解决方法:升级 ansible2.7

 

 

你可能感兴趣的:(ansible学习)