Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/repository_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 repository_label: "just_a_test_repo"
19 repository_url: "https://fixtures.pulpproject.org/rpm-signed/"
20
21 - hosts: tests
22 collections:
23 - theforeman.foreman
24 gather_facts: false
25 vars_files:
26 - vars/server.yml
27 tasks:
28 - name: fetch repository info
29 repository_info:
30 username: "{{ foreman_username }}"
31 password: "{{ foreman_password }}"
32 server_url: "{{ foreman_server_url }}"
33 validate_certs: "{{ foreman_validate_certs }}"
34 organization: "Test Organization"
35 product: "Test Product"
36 name: "Test Repository"
37 register: repository_info
38 - name: check repository details
39 assert:
40 that:
41 - repository_info['repository']['name'] == "Test Repository"
42
43 - name: search repository info
44 repository_info:
45 username: "{{ foreman_username }}"
46 password: "{{ foreman_password }}"
47 server_url: "{{ foreman_server_url }}"
48 validate_certs: "{{ foreman_validate_certs }}"
49 organization: "Test Organization"
50 product: "Test Product"
51 search: "label = just_a_test_repo"
52 register: repository_info
53 - name: check repository details
54 assert:
55 that:
56 - repository_info['repositories'][0]['name'] == "Test Repository"
57
58
59 - hosts: localhost
60 collections:
61 - theforeman.foreman
62 gather_facts: false
63 vars_files:
64 - vars/server.yml
65 tasks:
66 - include_tasks: tasks/repository.yml
67 vars:
68 repository_state: absent
69 - include_tasks: tasks/product.yml
70 vars:
71 product_state: absent
72 - include_tasks: tasks/organization.yml
73 vars:
74 organization_state: absent
75 ...