Unable to install git and related plugins in Jenkins using Ansible -


i trying install following jenkins plugins(while installing jenkins) using ansible

git,git-client,ssh,scm-api,shiningpanda plugin

after execution packages ssh, scm-api, shiningpanda plugins got installed.git , git-client not in list of installed plugins. below code , link the code have used:

- name: jenkins-cli jarfile jenkins server   get_url:     url: "http://{{host-name}}:8080/jnlpjars/jenkins-cli.jar"     dest: "/opt/jenkins-cli.jar"   register: jarfile_get   until: "'ok' in jarfile_get.msg or 'file exists' in jarfile_get.msg"   retries: 5   delay: 10  - name: install jenkins plugins   command: >     java -jar /opt/jenkins-cli.jar -s http://{{host-name}}:8080/ install-plugin {{ item }}     creates=/var/lib/jenkins/plugins/{{ item }}.jpi   with_items: jenkins_plugins   notify: restart jenkins  - name: force change of owner plugins   shell: chown -r konfilarity:konfilarity /var/lib/jenkins/plugins/*   notify: restart jenkins 

link ansible script referred :install-jenkins-plugin-ansible

you'll want add register: jenkins_output , failed_when: clauses jenkins command task, , have failed_when inspect jenkins_output.stdout , jenkins_output.stderr success/fail. don't know install-plugin, many of jenkins-cli commands don't return non-zero exit code on failure, ansible has no idea broke.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -