IMO, it seems this is an ansible runtime issue when running that playbook 
rather than a Jenkins issue 


On Monday, 26 September 2016 20:21:07 UTC+1, GBANE FETIGUE wrote:
>
> Hi, 
>
>
> I am running a Yaml deployment on with Jenkins. I specified the branch 
> (develop) but when I run the YAML I am getting error message . 
>
> ​The weird stuff is I have already added the key to bitbucket deployment key 
> . any ideas ?
> ​
>
> Started by user UserName LastName
> [EnvInject] - Loading node environment variables.
> Building in workspace 
> /opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace
>  > /opt/bitnami/git/bin/git rev-parse --is-inside-work-tree # timeout=10
> Fetching changes from the remote Git repository
>  > /opt/bitnami/git/bin/git config remote.origin.url 
> g...@bitbucket.org:Wildcardpay/push_demo_ui.git # timeout=10
> Fetching upstream changes from g...@bitbucket.org:Wildcardpay/push_demo_ui.git
>  > /opt/bitnami/git/bin/git --version # timeout=10
> using GIT_SSH to set credentials 
>  > /opt/bitnami/git/bin/git fetch --tags --progress 
> g...@bitbucket.org:Wildcardpay/push_demo_ui.git 
> +refs/heads/*:refs/remotes/origin/*
>  > /opt/bitnami/git/bin/git rev-parse refs/remotes/origin/develop^{commit} # 
> timeout=10
>  > /opt/bitnami/git/bin/git rev-parse 
> refs/remotes/origin/origin/develop^{commit} # timeout=10
> Checking out Revision 01e22b0ac99e9ba4a2c321f91e109080ff38215b 
> (refs/remotes/origin/develop)
>  > /opt/bitnami/git/bin/git config core.sparsecheckout # timeout=10
>  > /opt/bitnami/git/bin/git checkout -f 
> 01e22b0ac99e9ba4a2c321f91e109080ff38215b
>  > /opt/bitnami/git/bin/git rev-list 01e22b0ac99e9ba4a2c321f91e109080ff38215b 
> # timeout=10
> [EnvInject] - Executing scripts and injecting environment variables after the 
> SCM step.
> [EnvInject] - Injecting as environment variables the properties content 
> ANSIBLE_SSH_CONTROL_PATH='%(directory)s/%%h-%%r'
>
> [EnvInject] - Variables injected successfully.
> [workspace] $ /usr/bin/ansible-playbook ops/deploy-ms3.yml -i 
> ops/inventory/static -f 5 --private-key 
> /opt/bitnami/apache-tomcat/temp/ssh5992238100411202856.key -u bitnami 
> --vault-password-file=/opt/bitnami/apps/jenkins/jenkins_home/jobs/DemoUI/workspace@tmp/secretFiles/efdaab00-43b2-4944-ae17-826c1e0a72b7/vault_password.txt
>
> PLAY [configuring instances] 
> ***************************************************
>
> TASK [setup] 
> *******************************************************************
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : include_vars] 
> *************************************************
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : ensure .ssh directory exists.] 
> ********************************
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : install ssh key] 
> **********************************************
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : install git package] 
> ******************************************
>  [0;32mok: [52.4.198.19] [0m
>
> TASK [get_code : pull code] 
> ****************************************************
>  [0;31mfatal: [52.4.198.19]: FAILED! => {"changed": false, "cmd": 
> "/usr/bin/git ls-remote origin -h refs/heads/develop", "failed": true, "msg": 
> "conq: repository access denied. deployment key is not associated with the 
> requested repository.\nfatal: Could not read from remote 
> repository.\n\nPlease make sure you have the correct access rights\nand the 
> repository exists.", "rc": 128, "stderr": "conq: repository access denied. 
> deployment key is not associated with the requested repository.\nfatal: Could 
> not read from remote repository.\n\nPlease make sure you have the correct 
> access rights\nand the repository exists.\n", "stdout": "", "stdout_lines": 
> []} [0m
>
> NO MORE HOSTS LEFT 
> *************************************************************
>       to retry, use: --limit @ops/deploy-ms3.retry
>
> PLAY RECAP 
> *********************************************************************
>  [0;31m52.4.198.19 [0m                :  [0;32mok [0m [0;32m= [0m [0;32m5 [0m 
>    changed=0    unreachable=0     [0;31mfailed [0m [0;31m= [0m [0;31m1 [0m   
>
> FATAL: command execution failed
> hudson.AbortException: Ansible playbook execution failed
>       at 
> org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:227)
>       at 
> org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:200)
>       at 
> hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
>       at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
>       at hudson.model.Build$BuildExecution.build(Build.java:205)
>       at hudson.model.Build$BuildExecution.doRun(Build.java:162)
>       at 
> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
>       at hudson.model.Run.execute(Run.java:1738)
>       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
>       at hudson.model.ResourceController.execute(ResourceController.java:98)
>       at hudson.model.Executor.run(Executor.java:410)
> ERROR: Ansible playbook execution failed
> Finished: FAILURE
>
>
>
> ​
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/db95640e-8fe4-4c3b-ad9a-2b30e8409230%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to