0
我有Ansible 2.4.0。我想基于Ansible Jenkins DevOps Roles documentation配置詹金斯代理:Ansible中缺少jenkins_configure_proxy角色
- hosts: master
roles:
- jenkins_configure_proxy:
jenkins_home: "{{ jenkins_home }}"
proxy_host: "{{ proxy_host }}"
proxy_port: "{{ proxy_port }}"
become: true
environment: "{{proxy_env}}"
当试图执行ansible_playbook我得到:
错误!角色定义必须包含一个角色名
The error appears to have been in '/Users/me/projects/jenkins/jenkins.yml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
roles:
- jenkins_configure_proxy:
^here
这很奇怪,因为像jenkins_plugin
做工精细的其他角色。
我在做什么错?
谢谢,但它仍然引起同样的错误 – dzieciou
“ERROR角色‘jenkins_configure_proxy’中就没有...!”你在'。/ roles /'目录下有'jenkins_configure_proxy'吗? –