Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/domain_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 - vars/domain.yml
9 tasks:
10 - include_tasks: tasks/location.yml
11 vars:
12 location_name: "{{ item }}"
13 location_state: "present"
14 with_items: "{{ domain_locations }}"
15 - include_tasks: tasks/organization.yml
16 vars:
17 organization_name: "{{ item }}"
18 organization_state: "present"
19 with_items: "{{ domain_organizations }}"
20 - include_tasks: tasks/domain.yml
21 vars:
22 domain_state: "absent"
23 - name: create domain
24 include_tasks: tasks/domain.yml
25 vars:
26 domain_state: "present"
27 expected_change: true
28
29 - hosts: tests
30 collections:
31 - theforeman.foreman
32 gather_facts: false
33 vars_files:
34 - vars/server.yml
35 tasks:
36 - name: fetch domain info
37 domain_info:
38 username: "{{ foreman_username }}"
39 password: "{{ foreman_password }}"
40 server_url: "{{ foreman_server_url }}"
41 validate_certs: "{{ foreman_validate_certs }}"
42 name: "example.com"
43 register: domain_info
44 - name: check domain details
45 assert:
46 that:
47 - domain_info['domain']['name'] == "example.com"
48
49 - name: search domain info
50 domain_info:
51 username: "{{ foreman_username }}"
52 password: "{{ foreman_password }}"
53 server_url: "{{ foreman_server_url }}"
54 validate_certs: "{{ foreman_validate_certs }}"
55 search: "name = example.com"
56 register: domain_info
57 - name: check domain details
58 assert:
59 that:
60 - domain_info['domains'][0]['name'] == "example.com"
61
62 - hosts: localhost
63 collections:
64 - theforeman.foreman
65 gather_facts: false
66 vars_files:
67 - vars/server.yml
68 - vars/domain.yml
69 tasks:
70 - include_tasks: tasks/domain.yml
71 vars:
72 domain_state: "absent"
73 - include_tasks: tasks/location.yml
74 vars:
75 location_name: "{{ item }}"
76 location_state: "absent"
77 with_items: "{{ domain_locations | reverse | list }}"
78 - include_tasks: tasks/organization.yml
79 vars:
80 organization_name: "{{ item }}"
81 organization_state: "absent"
82 with_items: "{{ domain_organizations }}"
83 ...