kayobe/ansible/roles/swift-block-devices/tests/test-invalid-format.yml
Mark Goddard 0c309a18c8 Ubuntu: update Apt cache before package installation
Update Apt cache prior to all package installation tasks.

Adds apt_cache_valid_time, which defaults to 3600 seconds. This allows
the time for which the Apt cache is valid to be configured.

Change-Id: I0ecf4f4ce9b7333d3e41c69c3f908bee83391781
Story: 2004960
Task: 41766
2021-03-01 18:00:49 +00:00

25 lines
637 B
YAML

---
# Test case with swift_block_devices in an invalid format.
- hosts: localhost
connection: local
tasks:
- block:
- name: Test the swift-block-devices role
include_role:
name: ../../swift-block-devices
vars:
swift_block_devices:
- /dev/fake
apt_cache_valid_time: 3600
rescue:
- name: Flag that the error was raised
set_fact:
raised_error: true
- name: Flag that a failure occurred
set_fact:
test_failures: "{{ test_failures | default(0) | int + 1 }}"
when: raised_error is not defined