Debian Codegraph @

test/integration/targets/prepare_http_tests/tasks/main.yml

raw
1 # The docker --link functionality gives us an ENV var we can key off of to see if we have access to
2 # the httptester container
3 - set_fact:
4 has_httptester: "{{ lookup('env', 'HTTPTESTER') != '' }}"
5
6 - name: make sure we have the ansible_os_family and ansible_distribution_version facts
7 setup:
8 gather_subset: distribution
9 when: ansible_facts == {}
10
11 # If we are running with access to a httptester container, grab it's cacert and install it
12 - block:
13 # Override hostname defaults with httptester linked names
14 - include_vars: httptester.yml
15
16 - include_tasks: "{{ lookup('first_found', files)}}"
17 vars:
18 files:
19 - "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml"
20 - "{{ ansible_os_family | lower }}.yml"
21 - "default.yml"
22 when:
23 - has_httptester|bool
24 # skip the setup if running on Windows Server 2008 as httptester is not available
25 - ansible_os_family != 'Windows' or (ansible_os_family == 'Windows' and not ansible_distribution_version.startswith("6.0."))
26
27 - set_fact:
28 krb5_password: "{{ lookup('env', 'KRB5_PASSWORD') }}"
29
30 - name: setup Kerberos client
31 include_tasks: kerberos.yml
32 when:
33 - has_httptester|bool
34 - ansible_os_family != 'Windows'
35 - krb5_password != ''