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'嗎? –