ansible/library
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
..
cloud In the route53 module, documenting that TXT and SPF requests 2014-02-21 19:36:22 -08:00
commands Add creates= and removes= to the script: action 2014-02-18 12:52:09 +00:00
database Properly fetching the riak version, and properly setting the python interpreter. 2014-02-19 12:12:02 -05:00
files Fixing several bugs in assemble and updating tests 2014-02-24 14:27:23 -06:00
internal ansible -> ansibleworks 2014-01-28 20:29:41 -05:00
inventory Make add_host clear the inventory pattern cache, add some more aliases. Fixes #4442. 2013-10-11 16:37:10 -04:00
messaging Use new syntax for module snippets in rabbitmq_policy and update changelog 2014-02-05 16:21:18 -05:00
monitoring Merge pull request #5039 from bpennypacker/airbrake 2014-02-12 12:32:28 -05:00
net_infrastructure All modules should be using /usr/bin/python in the shebang as ansible_python_interpreter processes this (see FAQ). 2014-01-15 09:52:17 -05:00
network Merge pull request #5826 from romeotheriault/fix_follow_redirects 2014-02-07 11:36:51 -06:00
notification ansible -> ansibleworks 2014-01-28 20:29:41 -05:00
packaging Merge pull request #6045 from garaden/pypi_mirrors_gone 2014-02-18 13:58:11 -05:00
source_control Merge branch 'devel' of https://github.com/calebbrown/ansible into calebbrown-devel 2014-02-17 15:38:56 -06:00
system If you try to resize a lvol to the current size return a changed=False and don't fail. 2014-02-24 16:56:08 -06:00
utilities Add the start of an integration test structure using Ansible playbooks, also added an assert action plugin to make writing those easier. 2014-02-13 18:28:29 -05:00
web_infrastructure Clean up stray space at the end of a line after a period. 2014-02-03 11:52:37 -06:00