【发布时间】:2017-07-05 22:12:19
【问题描述】:
我实际上正在使用 Gitlab-CI 对我的剧本进行自动化测试,Ubuntu 运行良好,没有遇到任何问题。
实际上我遇到的问题是 CentOS 和 Systemd,首先是 Playbook(在 CentOS7 中安装 Postgres 9.5):
- name: Ensure PostgreSQL is running
service:
name: postgresql-9.5
state: restarted
ignore_errors: true
when:
- ansible_os_family == 'RedHat'
所以,如果我想在容器内启动 postgres,这就是我得到的:
Failed to get D-Bus connection: Operation not permitted\nFailed to get D-Bus connection: Operation not permitted\nFailed to get D-Bus connection: Operation not permitted\nFailed to get D-Bus connection: Operation not permitted\nFailed to get D-Bus connection: Operation not permitted\n
我已经必须在特权模式下运行容器,使用 c-groups 和其他任何东西。已经尝试过不同的 Docker 容器,但没有任何效果。
【问题讨论】:
标签: postgresql docker centos continuous-integration ansible