ansible/test/integration/targets/lvg/tasks/main.yml
Julien Girardin 3e303bea4c List correctly current PV in "lvg" module: fix lvg reduce (#49731)
* Refactor integration test for lvg module to introduce grow/reduce test

* List correctly current PV in lvg module: fix lvg reduce

Previous behaviour was to only take into account PV passed in 'pvs'
argument. This lead to reduce not working as expecting:

* with state=present and list of wanted pvs, lvg found only the pvs to
  add or already present and ignored the pv to remove (obviously absent
  from the list of given PV)

* with state=absent and a pv to remove, lvg found that the remaining pvs
  list is empty (ignoring possible other PV in the vg) and decides to
  remove the vg entirely (as supposely no PV are left anymore to store
  lvm metadata)

* Add changelog fragment
2018-12-20 15:43:18 +00:00

15 lines
313 B
YAML

- name: Install required packages (Linux)
package:
name: lvm2
state: present
when: ansible_system == 'Linux'
- name: Test lvg module
block:
- import_tasks: setup.yml
- import_tasks: test_indempotency.yml
- import_tasks: test_grow_reduce.yml
always:
- import_tasks: teardown.yml