Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/smart_proxy.yml

raw symbols SCIP
1 ---
2 # Do not do this on a production machine!
3 #
4 # To run recording for this test, you need to:
5 # - run a smart proxy box (e.g. centos7-foreman-proxy-3.17)
6 # - configure /etc/hosts on both machines
7 # o foreman.example.com -> main foreman server
8 # o foreman-proxy.example.com -> smart proxy
9 # - configure your smart proxy to listen to http on 8000
10 # - configure your smart proxy to trust anything
11 # - restart your smart proxy
12 # - disable selinux enforcing
13 # - record before puppet takes back those changes
14 #
15 # setenforce 0
16 # foreman-installer --foreman-proxy-http true --foreman-proxy-http-port 8000 --disable-system-checks \
17 # --foreman-proxy-trusted-hosts=EMPTY_ARRAY
18 #
19 # Do not do this on a production machine!
20
21 - hosts: localhost
22 collections:
23 - theforeman.foreman
24 gather_facts: false
25 vars_files:
26 - vars/server.yml
27 tasks:
28 - include_tasks: tasks/smart_proxy.yml
29 vars:
30 smart_proxy_state: absent
31
32 - hosts: tests
33 collections:
34 - theforeman.foreman
35 gather_facts: false
36 vars_files:
37 - vars/server.yml
38 tasks:
39 - include_tasks: tasks/smart_proxy.yml
40 vars:
41 smart_proxy_state: present
42 expected_change: true
43 expected_diff: true
44 expected_diff_before: "{}"
45 expected_diff_after: "{{ foreman_proxy }}"
46 - include_tasks: tasks/smart_proxy.yml
47 vars:
48 smart_proxy_state: present
49 expected_change: false
50 - include_tasks: tasks/smart_proxy.yml
51 vars:
52 smart_proxy_state: absent
53 expected_change: true
54 expected_diff: true
55 expected_diff_before: "{{ foreman_proxy }}"
56 expected_diff_after: "{}"
57 - include_tasks: tasks/smart_proxy.yml
58 vars:
59 smart_proxy_state: absent
60 expected_change: false
61
62 - hosts: localhost
63 collections:
64 - theforeman.foreman
65 gather_facts: false
66 vars_files:
67 - vars/server.yml
68 tasks:
69 - include_tasks: tasks/smart_proxy.yml
70 vars:
71 smart_proxy_state: absent
72 ...