Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/katello_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: present
31 smart_proxy_lifecycle_environments: []
32 - include_tasks: tasks/location.yml
33 vars:
34 location_name: "Test Location"
35 location_state: "present"
36 - include_tasks: tasks/organization.yml
37 vars:
38 organization_name: "Test Organization"
39 organization_state: "present"
40 - include_tasks: tasks/lifecycle_environment.yml
41 vars:
42 lifecycle_environment_state: present
43 lifecycle_environment_name: "{{ item.name }}"
44 lifecycle_environment_label: "{{ item.label }}"
45 lifecycle_environment_prior: "{{ item.prior }}"
46 loop:
47 - name: Dev
48 label: dev
49 prior: Library
50 - name: Test
51 label: test
52 prior: Dev
53
54 - hosts: tests
55 collections:
56 - theforeman.foreman
57 gather_facts: false
58 vars_files:
59 - vars/server.yml
60 tasks:
61 - include_tasks: tasks/smart_proxy.yml
62 vars:
63 smart_proxy_state: present
64 smart_proxy_lifecycle_environments:
65 - 'Dev'
66 expected_change: true
67 - include_tasks: tasks/smart_proxy.yml
68 vars:
69 smart_proxy_state: present
70 smart_proxy_lifecycle_environments:
71 - 'Dev'
72 expected_change: false
73 - include_tasks: tasks/smart_proxy.yml
74 vars:
75 smart_proxy_state: present
76 smart_proxy_lifecycle_environments:
77 - 'Test'
78 expected_change: true
79 - include_tasks: tasks/smart_proxy.yml
80 vars:
81 smart_proxy_state: present
82 smart_proxy_lifecycle_environments:
83 - 'Test'
84 - include_tasks: tasks/smart_proxy.yml
85 vars:
86 smart_proxy_download_policy: immediate
87 smart_proxy_state: present
88 expected_change: true
89 - include_tasks: tasks/smart_proxy.yml
90 vars:
91 smart_proxy_download_policy: immediate
92 smart_proxy_state: present
93 expected_change: false
94 ...