请说明为什么无法在角色列表项目中指定目录路径。
- name: Test
hosts: local
become: true
roles:
- ubuntu/16/site.nginx
# - { role: 'site.nginx', dir: 'ubuntu/16' } <---- ERROR
# - { role: 'ubuntu/16/site.nginx' } <--- OK
ERROR! the role 'centos/16/site.nginx' was not found in ...
The offending line appears to be:
roles:
- ubuntu/16/site.nginx
^ here
roles
└── ubuntu
└── 16
├── site.ngnix
- name: Test
hosts: local
become: true
roles:
- { role: 'ubuntu/16/site.nginx' }
结果
....
PLAY RECAP *********************************************************************
localhost : ok=15 changed=2 unreachable=0 failed=0
答案 0 :(得分:0)
roles_path =角色/:角色/ ubuntu的/ 16