Debian Codegraph @

ansible_collections/community/crypto/tests/integration/targets/prepare_http_tests/tasks/main.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 ####################################################################
7 # WARNING: These are designed specifically for Ansible tests #
8 # and should not be used as examples of how to write Ansible roles #
9 ####################################################################
10
11 # The docker --link functionality gives us an ENV var we can key off of to see if we have access to
12 # the httptester container
13 - ansible.builtin.set_fact:
14 has_httptester: "{{ lookup('env', 'HTTPTESTER') != '' }}"
15
16 - name: make sure we have the ansible_facts.os_family and ansible_facts.distribution_version facts
17 ansible.builtin.setup:
18 gather_subset: distribution
19 when: ansible_facts == {}
20
21 # If we are running with access to a httptester container, grab it's cacert and install it
22 - block:
23 # Override hostname defaults with httptester linked names
24 - ansible.builtin.include_vars: httptester.yml
25
26 - ansible.builtin.include_tasks: "{{ lookup('first_found', files) }}"
27 vars:
28 files:
29 - "{{ ansible_facts.os_family | lower }}.yml"
30 - "default.yml"
31 when:
32 - has_httptester|bool