小编Kar*_*Vee的帖子

无法使用ansible形成站点中文件的链接 - 可用于远程服务器中启用的目录站点?

无法使用ansible形成站点中文件的链接 - 可用于远程服务器中启用的目录站点?

这是我想使用 ansible 的文件模块执行的命令: ln -s /etc/apache2/sites-available/wsgi-keystone.conf /etc/apache2/sites-enabled

这是我正在使用的任务的代码:

- name: Enable the Identity service virtual hosts
  file: src=/etc/apache2/sites-available/wsgi-keystone.conf dest=/etc/apache2/sites-enabled state=link owner=root group=root mode=0644
Run Code Online (Sandbox Code Playgroud)

顺便说一下,我以 root 用户身份运行剧本:

得到以下错误:

fatal: [10.0.1.32]: FAILED! => {"changed": false, "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "refusing to convert between directory and link for /etc/apache2/sites-enabled", "owner": "root", "path": "/etc/apache2/sites-enabled", "size": 4096, "state": "directory", "uid": 0}
Run Code Online (Sandbox Code Playgroud)

linux automation ubuntu-14.04 yaml ansible

3
推荐指数
1
解决办法
8720
查看次数

标签 统计

ansible ×1

automation ×1

linux ×1

ubuntu-14.04 ×1

yaml ×1