Commit graph

12 commits

Author SHA1 Message Date
Stefan J. Betz
789ae4697c Require force for LVM shrink and remove operations in lvol. Fixes #5774
Conflicts:
	library/system/lvol
2014-02-24 18:52:35 -06:00
Richard C Isaacson
bf30707670 If you try to resize a lvol to the current size return a changed=False and don't fail.
This addresses GH-5165 and adds the ability to check if a lvol exists.

The tests for this don't fit nicely into the current integration tests so they are below.

```
---

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

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

- 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

- 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
  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
```
2014-02-24 16:56:08 -06:00
James Tanner
ad837709bd Addresses #5023 Fix import comments 2013-12-02 15:13:49 -05:00
James Tanner
6000d636b3 Fixes #5023 Convert all modules to use new snippet import pattern 2013-12-02 15:11:23 -05:00
Tomasz Lesniewski
385ffcdfb1 Module lvol fails when decimal point is a colon 2013-09-24 16:19:07 +02:00
Tomasz Lesniewski
e2815a56dc Module lvol fails when decimal point is a colon 2013-09-24 15:06:18 +02:00
James Cammarata
e32a6110af Removing skipped=True so the task is just marked as not-changed 2013-08-03 12:15:09 -05:00
James Cammarata
d98ad7b374 Set result to skipped when vol group is missing and lv state=absent
Fixes issue #3714 - lvol module state=absent fails (with error) if
the volume group doesn't exist
2013-08-02 20:32:56 -05:00
Florian Tham
ceff31241b fix fatal error when removing logical volumes 2013-07-19 10:59:11 +02:00
Serge van Ginderachter
f000dcd526 add more support for different size formats 2013-06-24 22:37:31 +02:00
Jan-Piet Mens
5c69918d53 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00
Michael DeHaan
391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Renamed from library/lvol (Browse further)