Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/subscription_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
16 - hosts: tests
17 collections:
18 - theforeman.foreman
19 gather_facts: false
20 vars_files:
21 - vars/server.yml
22 tasks:
23 - name: Fetch Subscription info via name
24 subscription_info:
25 username: "{{ foreman_username }}"
26 password: "{{ foreman_password }}"
27 server_url: "{{ foreman_server_url }}"
28 validate_certs: "{{ foreman_validate_certs }}"
29 organization: "Test Organization"
30 name: "Test Product"
31 register: sub
32 - name: check results
33 assert:
34 that:
35 - sub.subscription.name == 'Test Product'
36 - sub.subscription.product_name == 'Test Product'
37
38 - name: Fetch Subscription info via search
39 subscription_info:
40 username: "{{ foreman_username }}"
41 password: "{{ foreman_password }}"
42 server_url: "{{ foreman_server_url }}"
43 validate_certs: "{{ foreman_validate_certs }}"
44 organization: "Test Organization"
45 search: name="Test Product"
46 register: sub
47 - name: check results
48 assert:
49 that:
50 - sub.subscriptions[0].name == 'Test Product'
51 - sub.subscriptions[0].product_name == 'Test Product'
52
53 - hosts: localhost
54 collections:
55 - theforeman.foreman
56 gather_facts: false
57 vars_files:
58 - vars/server.yml
59 tasks:
60 - include_tasks: tasks/product.yml
61 vars:
62 product_state: absent
63 - include_tasks: tasks/organization.yml
64 vars:
65 organization_state: absent
66 ...