Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/monit/tasks/check_state.yml

raw
1 ---
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 - name: "{{ reason }} ('up')"
7 command: "curl -sf http://localhost:8082/hello"
8 when: service_state == 'up'
9 register: curl_result
10 until: not curl_result.failed
11 retries: 5
12 delay: 1
13
14 - name: "{{ reason }} ('down')"
15 command: "curl -sf http://localhost:8082/hello"
16 register: curl_result
17 failed_when: curl_result == 0
18 when: service_state == 'down'
19 until: not curl_result.failed
20 retries: 5
21 delay: 1