-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #214 from dwlehman/missing-volume-type-inherit
Capture inherited volume type in return value.
- Loading branch information
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
- hosts: all | ||
become: true | ||
vars: | ||
storage_safe_mode: false | ||
mount_location: '/opt/test1' | ||
|
||
tasks: | ||
- include_role: | ||
name: linux-system-roles.storage | ||
|
||
- include_tasks: get_unused_disk.yml | ||
vars: | ||
max_return: 1 | ||
|
||
- name: Create a partition device mounted on "{{ mount_location }}" | ||
include_role: | ||
name: linux-system-roles.storage | ||
vars: | ||
storage_pools: | ||
- name: "{{ unused_disks[0] }}" | ||
type: partition | ||
disks: "{{ unused_disks }}" | ||
volumes: | ||
- name: test1 | ||
fs_type: ext4 | ||
mount_point: "{{ mount_location }}" | ||
|
||
- name: Ensure the inherited type is reflected in blivet module output | ||
assert: | ||
that: blivet_output.pools[0].volumes[0].type == "partition" | ||
msg: "Incorrect type assigned to un-typed volume in partition pool" | ||
|
||
- include_tasks: verify-role-results.yml | ||
|
||
- name: Remove the partition created above | ||
include_role: | ||
name: linux-system-roles.storage | ||
vars: | ||
storage_pools: | ||
- name: "{{ unused_disks[0] }}" | ||
type: partition | ||
disks: "{{ unused_disks }}" | ||
state: absent | ||
volumes: | ||
- name: "{{ unused_disks[0] }}1" | ||
mount_point: "{{ mount_location }}" | ||
state: absent | ||
|
||
- name: Ensure the inherited type is reflected in blivet module output | ||
assert: | ||
that: blivet_output.pools[0].volumes[0].type == "partition" | ||
msg: "Incorrect type assigned to un-typed volume in partition pool" | ||
|
||
- include_tasks: verify-role-results.yml | ||
|
||
- name: Repeat the previous invocation to verify idempotence | ||
include_role: | ||
name: linux-system-roles.storage | ||
vars: | ||
storage_pools: | ||
- name: "{{ unused_disks[0] }}" | ||
type: partition | ||
disks: "{{ unused_disks }}" | ||
state: absent | ||
volumes: | ||
- name: "{{ unused_disks[0] }}1" | ||
mount_point: "{{ mount_location }}" | ||
state: absent | ||
|
||
- name: Ensure the inherited type is reflected in blivet module output | ||
assert: | ||
that: blivet_output.pools[0].volumes[0].type == "partition" | ||
msg: "Incorrect type assigned to un-typed volume in partition pool" | ||
|
||
- include_tasks: verify-role-results.yml |