Debian Codegraph @

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

raw symbols SCIP
1 ---
2 - hosts: localhost
3 collections:
4 - theforeman.foreman
5 gather_facts: false
6 vars_files:
7 - vars/server.yml
8 tasks:
9 - include_tasks: tasks/organization.yml
10 vars:
11 organization_state: present
12 - include_tasks: tasks/product.yml
13 vars:
14 product_state: present
15 - include_tasks: tasks/repository.yml
16 vars:
17 repository_state: present
18 - include_tasks: tasks/product.yml
19 vars:
20 product_name: "Test Product 2"
21 product_state: present
22 - include_tasks: tasks/repository.yml
23 vars:
24 product_name: "Test Product 2"
25 repository_state: present
26 - include_tasks: tasks/content_view.yml
27 vars:
28 content_view_name: "Test Composite Content View"
29 content_view_state: absent
30 - name: Create content view
31 include_tasks: tasks/content_view.yml
32 vars:
33 content_view_state: present
34 repositories:
35 - name: "Test Repository"
36 product: "Test Product"
37
38 - hosts: tests
39 collections:
40 - theforeman.foreman
41 gather_facts: false
42 vars_files:
43 - vars/server.yml
44 tasks:
45 - name: fetch content_view info
46 content_view_info:
47 username: "{{ foreman_username }}"
48 password: "{{ foreman_password }}"
49 server_url: "{{ foreman_server_url }}"
50 validate_certs: "{{ foreman_validate_certs }}"
51 name: "Test Content View"
52 register: content_view_info
53 - name: check content_view details
54 assert:
55 that:
56 - content_view_info['content_view']['name'] == "Test Content View"
57 - content_view_info['content_view']['repositories'][0]['name'] == "Test Repository"
58
59 - name: search content_view info
60 content_view_info:
61 username: "{{ foreman_username }}"
62 password: "{{ foreman_password }}"
63 server_url: "{{ foreman_server_url }}"
64 validate_certs: "{{ foreman_validate_certs }}"
65 search: 'name = "Test Content View"'
66 register: content_view_info
67 - name: check content_view details
68 assert:
69 that:
70 - content_view_info['content_views'][0]['name'] == "Test Content View"
71
72 - hosts: localhost
73 collections:
74 - theforeman.foreman
75 gather_facts: false
76 vars_files:
77 - vars/server.yml
78 tasks:
79 - include_tasks: tasks/content_view.yml
80 vars:
81 content_view_state: absent
82 - include_tasks: tasks/repository.yml
83 vars:
84 product_name: "Test Product 2"
85 repository_state: absent
86 - include_tasks: tasks/product.yml
87 vars:
88 product_name: "Test Product 2"
89 product_state: absent
90 - include_tasks: tasks/organization.yml
91 vars:
92 organization_state: absent