尝试在Jenkins管道中执行ansible脚本时获取权限被拒绝错误
下面是我的Jenkins管道脚本
node {
ansiblePlaybook colorized: true, extras: '-e ear_url="ARTIFACTORY URL here"', installation: 'ansible-2.7', playbook: '/etc/ansible/playbooks/deploy.yml', sudo: true
}
可疑脚本
hosts: tibco
user: root
sudo: yes
connection: ssh
gather_facts: no
vars:
my_ear: "{{ear_url}}"
ear_location: /tmp/EARS
tasks:
- name: Download the ear file from the artifactory
get_url:
url: "{{my_ear}}"
dest: "{{ear_location}}"
请帮帮我。
答案 0 :(得分:0)
确保所使用的用户对上述文件夹" / etc / ansible / playbooks"
具有写入权限