-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-host-vol-attach-playbook.yml
50 lines (50 loc) · 1.5 KB
/
create-host-vol-attach-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
- name: Create FC host, volume and map it to host
hosts: localhost
collections:
- ibm.spectrum_virtualize
gather_facts: no
connection: local
vars:
clustername: 129.40.188.157
domain:
username: superuser
password: <Your_Password>
log_path: /tmp/mkhost_attach_playbook.debug
tasks:
- name: Define a new FC host
ibm_svc_host:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path | default('/tmp/create_host_playbook.debug') }}"
name: ansible-host-svm12
state: present
fcwwpn: 100000109b46f496:100000109b46f497
iogrp: 0:1:2:3
protocol: scsi
type: generic
- name: Create a new volume
ibm_svc_vdisk:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path | default('/tmp/create_vol_playbook.debug') }}"
name: ansibleVol1
state: present
mdiskgrp: Pool0
easytier: "off"
size: "10"
unit: "gb"
- name: Map volume to host
ibm_svc_vol_map:
clustername: "{{ clustername }}"
domain: "{{ domain }}"
username: "{{ username }}"
password: "{{ password }}"
log_path: "{{ log_path | default('/tmp/map_vol_playbook.debug') }}"
volname: ansibleVol1
host: ansible-host-svm12
state: present