2017-11-09 12:04:53 +01:00
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-1
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail-1.0-1
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-1 again
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail-1.0-1
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1:1.0-2
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail-1:1.0-2.{{ ansible_architecture }}"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Remove dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Downgrade dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail-1.0-1
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
2018-08-27 19:17:47 +02:00
|
|
|
allow_downgrade: yes
|
2017-11-21 09:40:58 +01:00
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Update to the latest dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: latest
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.1-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-1 from a file (higher version is already installed)
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-1.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.1-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Remove dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-1 from a file
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-1.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-1 from a file again
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-1.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-2 from a file
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-2.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-2 from a file again
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-2.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Try to downgrade dinginessentail without allow_downgrade being set
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail-1.0-1
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
allow_downgrade: no
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Update dinginessentail with update_only set
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: latest
|
|
|
|
update_only: yes
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.1-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Remove dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Try to update dinginessentail which is not installed, update_only is set
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: latest
|
|
|
|
update_only: yes
|
|
|
|
register: yum_result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "rpm_result.rc == 1"
|
|
|
|
- "yum_result.rc == 0"
|
|
|
|
- "not yum_result.changed"
|
|
|
|
- "not yum_result is failed"
|
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
|
|
|
- name: Try to install incompatible arch
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir_ppc64 }}/dinginessentail-1.0-1.ppc64.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
ignore_errors: yes
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "rpm_result.rc == 1"
|
|
|
|
- "yum_result.rc == 1"
|
|
|
|
- "not yum_result.changed"
|
|
|
|
- "yum_result is failed"
|
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Make sure latest dinginessentail is installed
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: latest
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Downgrade dinginessentail using rpm file
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.0-1.{{ ansible_architecture }}.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
allow_downgrade: yes
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
# ============================================================================
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: make sure dinginessentail is not installed
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: install dinginessentail both archs
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
2019-08-07 20:26:55 +02:00
|
|
|
- "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm"
|
|
|
|
- "{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: try to install lower version of dinginessentail from rpm file, without allow_downgrade, just one arch
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout_lines[0].startswith('dinginessentail-1.1-1')"
|
|
|
|
- "rpm_result.stdout_lines[1].startswith('dinginessentail-1.1-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
when: ansible_architecture == "x86_64"
|
|
|
|
# ============================================================================
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: make sure dinginessentail is not installed
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: install dinginessentail both archs
|
2017-11-21 09:40:58 +01:00
|
|
|
yum:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
2019-08-07 20:26:55 +02:00
|
|
|
- "{{ repodir }}/dinginessentail-1.0-1.x86_64.rpm"
|
|
|
|
- "{{ repodir_i686 }}/dinginessentail-1.0-1.i686.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: Update both arch in one task using rpm files
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "{{ repodir }}/dinginessentail-1.1-1.x86_64.rpm,{{ repodir_i686 }}/dinginessentail-1.1-1.i686.rpm"
|
2017-11-21 09:40:58 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout_lines[0].startswith('dinginessentail-1.1-1')"
|
|
|
|
- "rpm_result.stdout_lines[1].startswith('dinginessentail-1.1-1')"
|
2017-11-21 09:40:58 +01:00
|
|
|
|
|
|
|
- name: verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
when: ansible_architecture == "x86_64"
|
|
|
|
# ============================================================================
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2017-11-21 09:40:58 +01:00
|
|
|
state: absent
|
2018-08-27 19:17:47 +02:00
|
|
|
|
|
|
|
# FIXME: dnf currently doesn't support epoch as part of it's pkg_spec for
|
|
|
|
# finding install candidates
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1619687
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install 1:dinginessentail-1.0-2
|
2018-08-27 19:17:47 +02:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "1:dinginessentail-1.0-2.{{ ansible_architecture }}"
|
2018-08-27 19:17:47 +02:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2018-08-27 19:17:47 +02:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2018-08-27 19:17:47 +02:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2018-08-27 19:17:47 +02:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
when: ansible_pkg_mgr == 'yum'
|
|
|
|
|
|
|
|
# DNF1 (Fedora < 26) had some issues:
|
|
|
|
# - did not accept architecture tag as valid component of a package spec unless
|
|
|
|
# installing a file (i.e. can't search the repo)
|
|
|
|
# - doesn't handle downgrade transactions via the API properly, marks it as a
|
|
|
|
# conflict
|
|
|
|
#
|
|
|
|
# NOTE: Both DNF1 and Fedora < 26 have long been EOL'd by their respective
|
|
|
|
# upstreams
|
|
|
|
- block:
|
|
|
|
# ============================================================================
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-2
|
2018-08-27 19:17:47 +02:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail-1.0-2.{{ ansible_architecture }}"
|
2018-08-27 19:17:47 +02:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2018-08-27 19:17:47 +02:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2018-08-27 19:17:47 +02:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0-2 again
|
2018-08-27 19:17:47 +02:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail-1.0-2
|
2018-08-27 19:17:47 +02:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2018-08-27 19:17:47 +02:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "not yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-2')"
|
2018-08-27 19:17:47 +02:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2018-08-27 19:17:47 +02:00
|
|
|
state: absent
|
|
|
|
when: not (ansible_distribution == "Fedora" and ansible_distribution_major_version|int < 26)
|
2018-10-30 16:28:22 +01:00
|
|
|
|
|
|
|
# https://github.com/ansible/ansible/issues/47689
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail == 1.0
|
2018-10-30 16:28:22 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail == 1.0"
|
2018-10-30 16:28:22 +01:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2018-10-30 16:28:22 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0-1')"
|
2018-10-30 16:28:22 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2018-10-30 16:28:22 +01:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
when: ansible_pkg_mgr == 'yum'
|
2018-11-08 17:39:02 +01:00
|
|
|
|
2019-04-08 10:34:21 +02:00
|
|
|
|
|
|
|
# https://github.com/ansible/ansible/pull/54603
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail < 1.1
|
2019-04-08 10:34:21 +02:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail < 1.1"
|
2019-04-08 10:34:21 +02:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2019-04-08 10:34:21 +02:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.0')"
|
2019-04-08 10:34:21 +02:00
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail >= 1.1
|
2019-04-08 10:34:21 +02:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail >= 1.1"
|
2019-04-08 10:34:21 +02:00
|
|
|
state: present
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2019-04-08 10:34:21 +02:00
|
|
|
register: rpm_result
|
|
|
|
|
|
|
|
- name: Verify installation
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result.changed"
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.1')"
|
2019-04-08 10:34:21 +02:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail
|
2019-04-08 10:34:21 +02:00
|
|
|
state: absent
|
|
|
|
|
|
|
|
when: ansible_pkg_mgr == 'yum'
|
|
|
|
|
2018-11-08 17:39:02 +01:00
|
|
|
# https://github.com/ansible/ansible/issues/45250
|
|
|
|
- block:
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Install dinginessentail-1.0, dinginessentail-olive-1.0, landsidescalping-1.0
|
2018-11-08 17:39:02 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: "dinginessentail-1.0,dinginessentail-olive-1.0,landsidescalping-1.0"
|
2018-11-08 17:39:02 +01:00
|
|
|
state: present
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Upgrade dinginessentail*
|
2018-11-08 17:39:02 +01:00
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail*
|
2018-11-08 17:39:02 +01:00
|
|
|
state: latest
|
|
|
|
register: yum_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail with rpm
|
|
|
|
shell: rpm -q dinginessentail
|
2018-11-08 17:39:02 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Verify update of dinginessentail
|
2018-11-08 17:39:02 +01:00
|
|
|
assert:
|
|
|
|
that:
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-1.1-1')"
|
2018-11-08 17:39:02 +01:00
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check dinginessentail-olive with rpm
|
|
|
|
shell: rpm -q dinginessentail-olive
|
2018-11-08 17:39:02 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Verify update of dinginessentail-olive
|
2018-11-08 17:39:02 +01:00
|
|
|
assert:
|
|
|
|
that:
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('dinginessentail-olive-1.1-1')"
|
2018-11-08 17:39:02 +01:00
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Check landsidescalping with rpm
|
|
|
|
shell: rpm -q landsidescalping
|
2018-11-08 17:39:02 +01:00
|
|
|
register: rpm_result
|
|
|
|
|
2019-08-07 20:26:55 +02:00
|
|
|
- name: Verify landsidescalping did NOT get updated
|
2018-11-08 17:39:02 +01:00
|
|
|
assert:
|
|
|
|
that:
|
2019-08-07 20:26:55 +02:00
|
|
|
- "rpm_result.stdout.startswith('landsidescalping-1.0-1')"
|
2018-11-08 17:39:02 +01:00
|
|
|
|
|
|
|
- name: Verify yum module outputs
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- "yum_result is changed"
|
|
|
|
- "'msg' in yum_result"
|
|
|
|
- "'rc' in yum_result"
|
|
|
|
- "'results' in yum_result"
|
|
|
|
always:
|
|
|
|
- name: Clean up
|
|
|
|
yum:
|
2019-08-07 20:26:55 +02:00
|
|
|
name: dinginessentail,dinginessentail-olive,landsidescalping
|
2018-11-08 17:39:02 +01:00
|
|
|
state: absent
|