我已經在我的操作手冊中找到了這一點。調用角色的dir參數
roles:
- {role: cleanup-create, dir: '/standard/', commit: "{{choice}}"}
文件結構是/roles/standard/cleanup-create/tasks/main.yml
然而,我收到此錯誤:
ERROR! the role 'cleanup-create' was not found in /home/myuser/network-ansible-myuser/roles:/home/myuser/network-ansible-myuser:/etc/ansible/roles
The error appears to have been in '/home/myuser/network-ansible-myuser/configure-files.yml': line 15, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- {role: cleanup-create, dir: '/standard', commit: "{{choice}}"}
^here
現在,錯誤消息似乎說我的角色沒有在/角色中找到。然而,dir參數應該使它看起來在/角色/標準下。
工作5分鐘前,我發誓!
我可以發誓,我做了它的工作。也許我看着錯誤的輸出。 – Quake