-
-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
jenkins_restart_method
to allow a safe restart
to be performe…
…d. This will ensure that all running jobs are completed.
- Loading branch information
1 parent
d929709
commit a9513f5
Showing
4 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
- name: restart jenkins via service | ||
service: name=jenkins state=restarted | ||
when: jenkins_restart_behavior == 'service' | ||
|
||
- name: safe-restart jenkins via CLI | ||
ansible.builtin.command: java -jar {{ jenkins_jar_location }} -auth {{ jenkins_admin_username }}:{{ jenkins_admin_password }} -s http://{{ jenkins_hostname }}:{{ jenkins_http_port }} safe-restart | ||
when: jenkins_restart_behavior == 'safe-restart' |