Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/memset_dns_reload/tasks/main.yml

raw
1 ---
2 ####################################################################
3 # WARNING: These are designed specifically for Ansible tests #
4 # and should not be used as examples of how to write Ansible roles #
5 ####################################################################
6
7 # Copyright (c) Ansible Project
8 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
9 # SPDX-License-Identifier: GPL-3.0-or-later
10
11 - name: request reload with invalid API key
12 memset_dns_reload:
13 api_key: "wa9aerahhie0eekee9iaphoorovooyia"
14 ignore_errors: true
15 register: result
16
17 - name: check API response with invalid API key
18 assert:
19 that:
20 - "'Memset API returned a 403 response (ApiErrorForbidden, Bad api_key)' in result.msg"
21 - result is not successful
22
23 - name: request reload and poll
24 memset_dns_reload:
25 api_key: "{{ api_key }}"
26 poll: true
27 register: result
28
29 - name: check reload succeeded
30 assert:
31 that:
32 - result is changed
33 - result is successful