2017-07-24 16 views
0

获取权限被拒绝错误时尝试在詹金斯管道执行ansible脚本面临的问题,通过詹金斯管道从afrtifactory使用ansible脚本下载aftrifacts

Jenkins error

下面是我詹金斯管道脚本

node { 
    ansiblePlaybook colorized: true, extras: '-e ear_url="ARTIFACTORY URL here"', installation: 'ansible-2.7', playbook: '/etc/ansible/playbooks/deploy.yml', sudo: true 
} 

ANSIBLE SCRIPT

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

如何设定正确的凭据(root用户密钥文件)? –

+0

你在Artufactory的artifactory.log和request.log中看到什么?正如@ KonstantinSuvorov所说,看起来你没有Artifactory的凭据,因此拒绝了权限。 – Ariel

回答

0

确保使用的用户有写上所提到的文件夹的访问“的/ etc/ansible /剧本”