我实际上正在使用Gitlab-CI对我的剧本进行自动化测试,Ubuntu工作得很好,没有问题。CentOS与Systemd上的Docker
这个问题实际上我是在CentOS和Systemd,首先是剧本(安装的Postgres 9.5里面CentOS7)的:
- 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组和其他任何东西。已经尝试了不同的Docker容器,但没有任何工作。
在我启动docker-systemctl-replacement脚本之后,我非常幸运,因此我不必再花费一段时间来开发systemd守护进程;) –