summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/dnf/tasks/modularity.yml
blob: 94f43a407542c41c09371f6c430e9837871e29b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# FUTURE - look at including AppStream support in our local repo
- name: Include distribution specific variables
  include_vars: "{{ item }}"
  with_first_found:
    - files:
        - "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
        - "{{ ansible_facts.distribution }}.yml"
      paths: ../vars

- name: install "{{ astream_name }}" module
  dnf:
    name: "{{ astream_name }}"
    state: present
  register: dnf_result

- name: verify installation of "{{ astream_name }}" module
  assert:
    that:
        - "not dnf_result.failed"
        - "dnf_result.changed"

- name: install "{{ astream_name }}" module again
  dnf:
    name: "{{ astream_name }}"
    state: present
  register: dnf_result

- name: verify installation of "{{ astream_name }}" module again
  assert:
    that:
        - "not dnf_result.failed"
        - "not dnf_result.changed"

- name: uninstall "{{ astream_name }}" module
  dnf:
    name: "{{ astream_name }}"
    state: absent
  register: dnf_result

- name: verify uninstallation of "{{ astream_name }}" module
  assert:
    that:
        - "not dnf_result.failed"
        - "dnf_result.changed"

- name: uninstall "{{ astream_name }}" module again
  dnf:
    name: "{{ astream_name }}"
    state: absent
  register: dnf_result

- name: verify uninstallation of "{{ astream_name }}" module again
  assert:
    that:
        - "not dnf_result.failed"
        - "not dnf_result.changed"

- name: install "{{ astream_name_no_stream }}" module without providing stream
  dnf:
    name: "{{ astream_name_no_stream }}"
    state: present
  register: dnf_result

- name: verify installation of "{{ astream_name_no_stream }}" module without providing stream
  assert:
    that:
        - "not dnf_result.failed"
        - "dnf_result.changed"

- name: install "{{ astream_name_no_stream }}" module again without providing stream
  dnf:
    name: "{{ astream_name_no_stream }}"
    state: present
  register: dnf_result

- name: verify installation of "{{ astream_name_no_stream }}" module again without providing stream
  assert:
    that:
        - "not dnf_result.failed"
        - "not dnf_result.changed"

- name: uninstall "{{ astream_name_no_stream }}" module without providing stream
  dnf:
    name: "{{ astream_name_no_stream }}"
    state: absent
  register: dnf_result

- name: verify uninstallation of "{{ astream_name_no_stream }}" module without providing stream
  assert:
    that:
        - "not dnf_result.failed"
        - "dnf_result.changed"

- name: uninstall "{{ astream_name_no_stream }}" module again without providing stream
  dnf:
    name: "{{ astream_name_no_stream }}"
    state: absent
  register: dnf_result

- name: verify uninstallation of "{{ astream_name_no_stream }}" module again without providing stream
  assert:
    that:
        - "not dnf_result.failed"
        - "not dnf_result.changed"