ansible/ansible — pull request #6159 by risaacson (2014-02-24 23:56:35+00:00)
Title: Superset merge of lvol

Includes GH-6158(GH-5165) and GH-5774.

Tests:
```
---
# This playbook creates and removes logical volumes.

- name: remove any existing lv=one of vg=main
lvol: lv=one vg=main state=absent force=yes

- name: remove any existing lv=two of vg=main
lvol: lv=two vg=main state=absent force=yes

- name: check to see if lv=one of vg=main exists
lvol: lv=one vg=main state=present
ignore_errors: true
register: lvol_result0

- name: Assert that we will get a "No size given."
assert:
that:
- "'No size given.' in lvol_result0.msg"

- name: create lv=one of vg=main sized 30g
lvol: lv=one size=30g vg=main state=present
register: lvol_result1

- name: Assert that we made changes."
assert:
that:
- "lvol_result1.changed == True"

- name: check to see if lv=one of vg=main exists
lvol: lv=one vg=main state=present
register: lvol_result2

- name: Assert that we did not make changes."
assert:
that:
- "lvol_result2.changed == False"

- name: remove lv=one of vg=main
lvol: lv=one vg=main state=absent force=yes

- name: create lv=two of vg=main sized 30G
lvol: lv=two size=30G vg=main state=present
register: lvol_result3

- name: Assert that we made changes."
assert:
that:
- "lvol_result3.changed == True"

- name: reduce lv=two of vg=main to 15G
lvol: lv=two size=15G vg=main state=present force=yes
register: lvol_result4

- name: Assert that we made changes."
assert:
that:
- "lvol_result4.changed == True"

- name: increase lv=two of vg=main to 30G
lvol: lv=two size=30G vg=main state=present
register: lvol_result5

- name: Assert that we made changes."
assert:
that:
- "lvol_result5.changed == True"

- name: create lv=two of vg=main sized 30G when already exists at 30G
lvol: lv=two size=30g vg=main state=present
register: lvol_result6

- name: Assert that we did not make changes."
assert:
that:
- "lvol_result6.changed == False"

- name: remove lv=two of vg=main
lvol: lv=two vg=main state=absent force=yes
```