Skip to content

Commit

Permalink
Merge pull request #232 from fbalak/stop-volume
Browse files Browse the repository at this point in the history
Stop volume
  • Loading branch information
fbalak authored Jan 28, 2019
2 parents 3cbfede + 812d0c3 commit 7d1a4b9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test_setup.gluster_volume_stop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# ===========================================================================
# QE configuration for stopping gluster volumes on gluster machines
# ===========================================================================
#
# This playbook serves as a setup for tests that check availability of
# gluster volumes.

- hosts: gluster_servers
remote_user: root
tasks:
- name: Get list of gluster volumes
command: gluster volume list
run_once: true
register: gluster_volumes
changed_when: false

- name: Stop all gluster volumes
gluster_volume:
state: stopped
name: "{{ item }}"
with_items: "{{ gluster_volumes.stdout_lines }}"
run_once: true
retries: 5
delay: 5
register: result
until: 'result is success'
27 changes: 27 additions & 0 deletions test_teardown.gluster_volume_stop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# ===========================================================================
# QE configuration for starting again gluster volumes on gluster machines
# ===========================================================================
#
# This playbook serves as a teardown for tests that check availability of
# gluster volumes. It starts all gluster volumes on gluster nodes.

- hosts: gluster_servers
remote_user: root
tasks:
- name: Get list of gluster volumes
command: gluster volume list
run_once: true
register: gluster_volumes
changed_when: false

- name: Start all gluster volumes
gluster_volume:
state: started
name: "{{ item }}"
with_items: "{{ gluster_volumes.stdout_lines }}"
run_once: true
retries: 5
delay: 5
register: result
until: 'result is success'

0 comments on commit 7d1a4b9

Please sign in to comment.