forked from PureStorage-OpenConnect/purestorage-puppet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.pp
87 lines (84 loc) · 3.81 KB
/
site.pp
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#Example of Puppet Device
node 'cloud-dev-405-a12-02.puretec.purestorage.com' { #--> This is Device name
volume{ 'pure_storage_volume':
#ensure either "present" or "absent"
ensure => 'present',
volume_name => 'test_device_volume_1',
volume_size => '2.5G',
}
hostconfig{ 'pure_storage_host':
ensure => 'present',
host_name => 'test-device-host',
host_iqnlist => ['iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03f','iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03g'],
}
connection{ 'pure_storage_connection':
ensure => 'present',
host_name => 'test-device-host',
volume_name => 'test_device_volume_1',
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
}
}
#Example of Puppet Agent
node 'puppet-agent.puretec.purestorage.com'{ #--> This is Agent vm name
#Note : device_url is MANDATORY here.
$device_url = 'https://pureuser:[email protected]'
volume{ 'pure_storage_volume':
#ensure either "present" or "absent"
ensure => 'present',
volume_name => 'test_agent_volume_1',
volume_size => '1.0G',
device_url => $device_url,
}
hostconfig{ 'pure_storage_host':
ensure => 'present',
host_name => 'test-agent-host',
host_iqnlist => ['iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03h','iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e0i'],
device_url => $device_url,
}
connection{ 'pure_storage_connection':
ensure => 'present',
host_name => 'test-agent-host',
volume_name => 'test_agent_volume_1',
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
#Mandatory only for Puppet Apply and Agent approach.
device_url => $device_url,
}
}
#Example of Puppet Apply
node 'puppet.puretec.purestorage.com'{ #--> This is master vm name
#Note: device_url is MANDATORY here.
$device_url = 'https://pureuser:[email protected]'
volume{ 'pure_storage_volume':
#ensure either "present" or "absent"
ensure => 'present',
volume_name => 'test_apply_volume_1',
volume_size => '1.0G',
device_url => $device_url,
}
hostconfig{ 'pure_storage_host':
ensure => 'present',
host_name => 'test-apply-host',
host_iqnlist => ['iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03j','iqn.1994-04.jp.co.pure:rsd.d9s.t.10103.0e03k'],
device_url => $device_url,
}
connection{ 'pure_storage_connection':
ensure => 'present',
host_name => 'test-apply-host',
volume_name => 'test_apply_volume_1',
#Added dependency on volume and host resource types
#to be present, other wise connection will fail.
require => [Volume['pure_storage_volume'],
Hostconfig['pure_storage_host']
],
#Mandatory only for Puppet Apply and Agent approach.
device_url => $device_url,
}
}