Debian Codegraph @

ansible_collections/community/general/tests/integration/targets/ipify_facts/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 # Test code for the ipify_facts
8 # Copyright (c) 2017, Abhijeet Kasurde <[email protected]>
9 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
10 # SPDX-License-Identifier: GPL-3.0-or-later
11
12 - debug: var=ansible_distribution
13 - debug: var=ansible_distribution_version
14
15 - set_fact:
16 validate_certs: false
17 when: (ansible_facts.distribution == "MacOSX" and ansible_facts.distribution_version == "10.11.1")
18
19 - name: get information about current IP using ipify facts
20 ipify_facts:
21 timeout: 30
22 validate_certs: "{{ validate_certs }}"
23 register: external_ip
24 until: external_ip is successful
25 retries: 5
26 delay: 10
27
28 - name: check if task was successful
29 assert:
30 that:
31 - external_ip is not changed
32 - external_ip.ansible_facts is defined
33 - external_ip.ansible_facts.ipify_public_ip is defined