-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from fbalak/stop-volume
Stop volume
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |