-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "Add zuul-merger to sf-operator"
- Loading branch information
Showing
9 changed files
with
241 additions
and
7 deletions.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,51 @@ | ||
- name: Get Zuul Components | ||
ansible.builtin.uri: | ||
url: https://{{ zuul_host }}/zuul/api/components | ||
status_code: [200] | ||
method: GET | ||
validate_certs: "{{ validate_certs }}" | ||
register: _components | ||
|
||
- name: Check if, at least, one Zuul Web instance Exists, fails otherwise | ||
ansible.builtin.fail: | ||
msg: "Zuul Web has no instances" | ||
when: "_components.json['web'] | length == 0" | ||
|
||
- name: Check if Zuul Web Intances are running | ||
ansible.builtin.fail: | ||
msg: "Zuul Web has an element {{ item.hostname }} on a non-running state: {{ item.state }}" | ||
failed_when: "'running' not in item.state" | ||
loop: "{{ _components.json['web'] }}" | ||
|
||
- name: Check if, at least, one Zuul Scheduler instance Exists, fails otherwise | ||
ansible.builtin.fail: | ||
msg: "Zuul Scheduler has no instances" | ||
when: "_components.json['scheduler'] | length == 0" | ||
|
||
- name: Check if Zuul Scheduler Instances are Running | ||
ansible.builtin.fail: | ||
msg: "Zuul Scheduler has an element {{ item.hostname }} on a non-running state: {{ item.state }}" | ||
failed_when: "'running' not in item.state" | ||
loop: "{{ _components.json['scheduler'] }}" | ||
|
||
- name: Check if, at least, one Zuul Executor Instance Exists, fails otherwise | ||
ansible.builtin.fail: | ||
msg: "Zuul Executor has no instances" | ||
when: "_components.json['executor'] | length == 0" | ||
|
||
- name: Check if Zuul Executor Instances are Running | ||
ansible.builtin.fail: | ||
msg: "Zuul Executor has an element {{ item.hostname }} on a non-running state: {{ item.state }}" | ||
failed_when: "'running' not in item.state" | ||
loop: "{{ _components.json['executor'] }}" | ||
|
||
- name: Check if, at least, one Zuul Merger Instances Exists, fails otherwise | ||
ansible.builtin.fail: | ||
msg: "Zuul Merger has no instances" | ||
when: "_components.json['merger'] | length == 0" | ||
|
||
- name: Check if Zuul Merger Components are Running | ||
ansible.builtin.fail: | ||
msg: "Zuul Merger has an element {{ item.hostname }} on a non-running state: {{ item.state }}" | ||
failed_when: "'running' not in item.state" | ||
loop: "{{ _components.json['merger'] }}" |
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