-
-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
…ble_restart Add `jenkins_restart_method` to allow a `safe restart` to be performed.
- Loading branch information
There are no files selected for viewing
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 | ||
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
Check warning on line 7 in tasks/restart.yml GitHub Actions / Lint
|
||
when: jenkins_restart_behavior == 'safe-restart' |