copr-be: check RAID10 volumes
This commit is contained in:
parent
459bdc5248
commit
614ded054b
2 changed files with 38 additions and 1 deletions
|
@ -1,2 +1,7 @@
|
|||
# Put here configuration for all copr instances (production, devel, ...)
|
||||
|
||||
---
|
||||
copr_backend_data_raid10_volumes:
|
||||
- nvme-Amazon_Elastic_Block_Store_vol017b9ff832cb0fd97-part1
|
||||
- nvme-Amazon_Elastic_Block_Store_vol0188cd4fedb1e7c78-part1
|
||||
- nvme-Amazon_Elastic_Block_Store_vol025a19c2330fca7cd-part1
|
||||
- nvme-Amazon_Elastic_Block_Store_vol0e809c6ef1c11f2c9-part1
|
||||
|
|
|
@ -1,3 +1,35 @@
|
|||
---
|
||||
- name: raid10 volume on the production machine
|
||||
when: devel
|
||||
tags: mdadm
|
||||
block:
|
||||
- name: install LVM and RAID utilities
|
||||
package:
|
||||
name:
|
||||
- lvm2
|
||||
- mdadm
|
||||
tags:
|
||||
- mdadm
|
||||
|
||||
- name: stat the raid volumes
|
||||
stat:
|
||||
path: "/dev/disk/by-id/{{ item }}"
|
||||
register: stat_raid
|
||||
loop: "{{ copr_backend_data_raid10_volumes }}"
|
||||
|
||||
- name: fail if raid volumes do not exist
|
||||
debug: msg=checked
|
||||
failed_when: not item.stat.exists
|
||||
loop: "{{ stat_raid.results }}"
|
||||
|
||||
- name: stat the ext4 filesystem
|
||||
stat: path=/dev/disk/by-label/copr-repo-raid10
|
||||
register: stat_repo_fs
|
||||
|
||||
- name: fail if ext4 filesystem is not found by devmapper
|
||||
debug: msg=checked
|
||||
failed_when: stat_repo_fs.stat.exists
|
||||
|
||||
- name: prepare mount point
|
||||
file: state=directory path=/var/lib/copr/public_html
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue