소스 검색

current

master
부모
커밋
57de84ebce
1개의 변경된 파일28개의 추가작업 그리고 5개의 파일을 삭제
  1. +28
    -5
      tasks/main.yml

+ 28
- 5
tasks/main.yml 파일 보기

@@ -1,17 +1,38 @@
--- ---


- name: blkid
command: blkid
register: blkid
#- name: mdadm detail scan
# command: mdadm --detail --scan {{ item.device }}
# register: _mdadm_detail_scan_output
# with_items: "{{ mdraid_devices }}"
# failed_when: false
# changed_when: false
#
#- debug: msg={{_mdadm_detail_scan_output}}
#
#- name: set state
- name: set devices
set_fact: mdraid_devices={{ _mdraid_devices }}
#- name: blkid
# command: blkid
# register: blkid

#- name: set devices
# set_fact: mdraid_devices={{ _mdraid_devices }}

- name: stop
command:
mdadm --stop
{{ item.devices | join(" ") }}
with_items: "{{ mdraid_devices }}"
when:
mdraid_devices_state == "stopped"


- name: zero superblock - name: zero superblock
command: command:
mdadm --zero-superblock mdadm --zero-superblock
{{ item.devices | join(" ") }} {{ item.devices | join(" ") }}
with_items: "{{ mdraid_devices }}" with_items: "{{ mdraid_devices }}"
when:
mdraid_devices_state == "created"


- name: create - name: create
command: command:
@@ -22,3 +43,5 @@
--metadata={{ item.metadata | default("1.2") }} --metadata={{ item.metadata | default("1.2") }}
{{ item.devices | join(" ") }} {{ item.devices | join(" ") }}
with_items: "{{ mdraid_devices }}" with_items: "{{ mdraid_devices }}"
when:
mdraid_devices_state == "created"

불러오는 중...
취소
저장