Commit ae6bef93 by Brian Beggs Committed by Feanil Patel

modify jenkins command so the register works correctly in ansible 2.x

parent d8ab2396
...@@ -26,15 +26,14 @@ ...@@ -26,15 +26,14 @@
dest: "{{ jenkins_cli_jar }}" dest: "{{ jenkins_cli_jar }}"
- name: execute command - name: execute command
shell: > shell: "{{ jenkins_command_prefix|default('') }} java -jar {{ jenkins_cli_jar }} -s http://localhost:{{ jenkins_port }} {{ jenkins_auth_realm.cli_auth }} {{ jenkins_command_string }}"
{{ jenkins_command_prefix|default('') }} java -jar {{ jenkins_cli_jar }} -s http://localhost:{{ jenkins_port }}
{{ jenkins_auth_realm.cli_auth }}
{{ jenkins_command_string }}
register: jenkins_command_output register: jenkins_command_output
ignore_errors: "{{ jenkins_ignore_cli_errors|default (False) }}" ignore_errors: "{{ jenkins_ignore_cli_errors|default (False) }}"
- name: "clean up --- remove the credentials dir" - name: "clean up --- remove the credentials dir"
file: name=jenkins_cli_root state=absent file:
name: jenkins_cli_root
state: absent
- name: "clean up --- remove cached Jenkins credentials" - name: "clean up --- remove cached Jenkins credentials"
command: rm -rf $HOME/.jenkins command: rm -rf $HOME/.jenkins
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment