puppet-repl 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,315 @@
1
+ --- !ruby/object:Puppet::Node
2
+ name: puppetdev.localdomain
3
+ classes:
4
+ puppet_enterprise:
5
+ mcollective_middleware_hosts:
6
+ - pe-puppet.localdomain
7
+ use_application_services: false
8
+ database_host: pe-puppet.localdomain
9
+ puppetdb_host: pe-puppet.localdomain
10
+ database_port: "5432"
11
+ database_ssl: true
12
+ puppet_master_host: pe-puppet.localdomain
13
+ certificate_authority_host: pe-puppet.localdomain
14
+ console_port: "443"
15
+ puppetdb_database_name: pe-puppetdb
16
+ puppetdb_database_user: pe-puppetdb
17
+ pcp_broker_host: pe-puppet.localdomain
18
+ puppetdb_port: "8081"
19
+ console_host: pe-puppet.localdomain
20
+ "puppet_enterprise::profile::agent": {}
21
+ "puppet_enterprise::profile::mcollective::agent": {}
22
+ parameters:
23
+ kernel: Linux
24
+ ipaddress6_lo: "::1"
25
+ network6_lo: "::1"
26
+ custom_auth_conf: false
27
+ puppet_files_dir_present: false
28
+ selinux: false
29
+ clientnoop: false
30
+ is_pe: false
31
+ hardwareisa: x86_64
32
+ hardwaremodel: x86_64
33
+ architecture: x86_64
34
+ platform_tag: el-7-x86_64
35
+ rubysitedir: /opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0
36
+ productname: "VMware Virtual Platform"
37
+ blockdevice_sr0_vendor: NECVMWar
38
+ facterversion: "3.1.6"
39
+ processorcount: 1
40
+ physicalprocessorcount: 1
41
+ netmask6_eth0: "ffff:ffff:ffff:ffff::"
42
+ netmask6: "ffff:ffff:ffff:ffff::"
43
+ pe_concat_basedir: /opt/puppetlabs/puppet/cache/pe_concat
44
+ chassisassettag: "No Asset Tag"
45
+ pe_razor_server_version: "package pe-razor-server is not installed"
46
+ rubyversion: "2.1.8"
47
+ boardmanufacturer: "Intel Corporation"
48
+ timezone: UTC
49
+ bios_vendor: "Phoenix Technologies LTD"
50
+ os:
51
+ architecture: x86_64
52
+ family: RedHat
53
+ hardware: x86_64
54
+ name: CentOS
55
+ release:
56
+ full: "7.2.1511"
57
+ major: "7"
58
+ minor: "2"
59
+ selinux:
60
+ enabled: false
61
+ osfamily: RedHat
62
+ operatingsystem: CentOS
63
+ operatingsystemrelease: "7.2.1511"
64
+ operatingsystemmajrelease: "7"
65
+ augeasversion: "1.4.0"
66
+ ipaddress_lo: "127.0.0.1"
67
+ swapsize_mb: 1108.51953125
68
+ swapfree_mb: 1108.51953125
69
+ manufacturer: "VMware, Inc."
70
+ domain: localdomain
71
+ bios_version: "6.00"
72
+ network_lo: "127.0.0.0"
73
+ gid: root
74
+ id: root
75
+ aio_agent_version: "1.4.2"
76
+ aio_agent_build: "1.4.2"
77
+ ipaddress6_eth0: "fe80::42:acff:fe11:2"
78
+ ipaddress6: "fe80::42:acff:fe11:2"
79
+ netmask_lo: "255.0.0.0"
80
+ network6: "fe80::"
81
+ network6_eth0: "fe80::"
82
+ processor0: "Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz"
83
+ staging_http_get: curl
84
+ blockdevice_fd0_size: 0
85
+ uptime_days: 0
86
+ uptime_hours: 0
87
+ platform_symlink_writable: true
88
+ is_virtual: true
89
+ boardserialnumber: None
90
+ bios_release_date: "05/20/2014"
91
+ swapfree: "1.08 GiB"
92
+ swapsize: "1.08 GiB"
93
+ uptime: "0:34 hours"
94
+ mtu_eth0: 1500
95
+ identity:
96
+ gid: 0
97
+ group: root
98
+ uid: 0
99
+ user: root
100
+ puppetversion: "4.4.2"
101
+ clientversion: "4.4.2"
102
+ rubyplatform: x86_64-linux
103
+ chassistype: Other
104
+ ipaddress_eth0: "172.17.0.2"
105
+ ipaddress: "172.17.0.2"
106
+ mtu_lo: 65536
107
+ macaddress: "02:42:ac:11:00:02"
108
+ macaddress_eth0: "02:42:ac:11:00:02"
109
+ augeas:
110
+ version: "1.4.0"
111
+ netmask6_lo: "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
112
+ ruby:
113
+ platform: x86_64-linux
114
+ sitedir: /opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0
115
+ version: "2.1.8"
116
+ blockdevice_sda_model: "VMware Virtual S"
117
+ blockdevice_sda_vendor: "VMware,"
118
+ processors:
119
+ count: 1
120
+ isa: x86_64
121
+ models:
122
+ - "Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz"
123
+ physicalcount: 1
124
+ blockdevices: "fd0,sda,sr0"
125
+ boardproductname: "440BX Desktop Reference Platform"
126
+ networking:
127
+ mac: "02:42:ac:11:00:02"
128
+ ip6: "fe80::42:acff:fe11:2"
129
+ hostname: puppetdev
130
+ netmask6: "ffff:ffff:ffff:ffff::"
131
+ interfaces:
132
+ eth0:
133
+ mac: "02:42:ac:11:00:02"
134
+ ip6: "fe80::42:acff:fe11:2"
135
+ bindings:
136
+ - address: "172.17.0.2"
137
+ netmask: "255.255.0.0"
138
+ network: "172.17.0.0"
139
+ netmask6: "ffff:ffff:ffff:ffff::"
140
+ netmask: "255.255.0.0"
141
+ network: "172.17.0.0"
142
+ mtu: 1500
143
+ ip: "172.17.0.2"
144
+ bindings6:
145
+ - address: "fe80::42:acff:fe11:2"
146
+ netmask: "ffff:ffff:ffff:ffff::"
147
+ network: "fe80::"
148
+ network6: "fe80::"
149
+ lo:
150
+ ip6: "::1"
151
+ bindings:
152
+ - address: "127.0.0.1"
153
+ netmask: "255.0.0.0"
154
+ network: "127.0.0.0"
155
+ netmask6: "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
156
+ netmask: "255.0.0.0"
157
+ network: "127.0.0.0"
158
+ mtu: 65536
159
+ ip: "127.0.0.1"
160
+ bindings6:
161
+ - address: "::1"
162
+ netmask: "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
163
+ network: "::1"
164
+ network6: "::1"
165
+ fqdn: puppetdev.localdomain
166
+ netmask: "255.255.0.0"
167
+ network: "172.17.0.0"
168
+ mtu: 1500
169
+ primary: eth0
170
+ ip: "172.17.0.2"
171
+ domain: localdomain
172
+ network6: "fe80::"
173
+ memoryfree: "788.06 MiB"
174
+ system_uptime:
175
+ days: 0
176
+ hours: 0
177
+ seconds: 2069
178
+ uptime: "0:34 hours"
179
+ uptime_seconds: 2069
180
+ memoryfree_mb: 788.0625
181
+ memory:
182
+ swap:
183
+ available: "1.08 GiB"
184
+ available_bytes: 1162366976
185
+ capacity: "0%"
186
+ total: "1.08 GiB"
187
+ total_bytes: 1162366976
188
+ used: "0 bytes"
189
+ used_bytes: 0
190
+ system:
191
+ available: "788.06 MiB"
192
+ available_bytes: 826343424
193
+ capacity: "20.89%"
194
+ total: "996.13 MiB"
195
+ total_bytes: 1044512768
196
+ used: "208.06 MiB"
197
+ used_bytes: 218169344
198
+ kernelrelease: "4.1.13-boot2docker"
199
+ memorysize_mb: 996.125
200
+ memorysize: "996.13 MiB"
201
+ hostname: puppetdev
202
+ virtual: docker
203
+ interfaces: "eth0,lo"
204
+ blockdevice_sr0_model: "VMware SATA CD01"
205
+ netmask: "255.255.0.0"
206
+ netmask_eth0: "255.255.0.0"
207
+ trusted:
208
+ authenticated: remote
209
+ certname: puppetdev.localdomain
210
+ domain: localdomain
211
+ extensions: {}
212
+ hostname: puppetdev
213
+ clientcert: puppetdev.localdomain
214
+ fqdn: puppetdev.localdomain
215
+ path: "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"
216
+ blockdevice_sr0_size: 31457280
217
+ kernelversion: "4.1.13"
218
+ uuid: "564D25BB-6B40-EBBF-38B3-07CCD4455918"
219
+ network_eth0: "172.17.0.0"
220
+ network: "172.17.0.0"
221
+ blockdevice_sda_size: 20971520000
222
+ kernelmajversion: "4.1"
223
+ filesystems: "cramfs,ext2,ext3,ext4,iso9660,squashfs,vfat"
224
+ mountpoints:
225
+ /etc/hostname:
226
+ filesystem: ext4
227
+ device: /dev/sda1
228
+ used_bytes: 5667684352
229
+ available_bytes: 13854396416
230
+ used: "5.28 GiB"
231
+ size: "18.18 GiB"
232
+ options:
233
+ - rw
234
+ - relatime
235
+ - "data=ordered"
236
+ size_bytes: 19522080768
237
+ available: "12.90 GiB"
238
+ capacity: "29.03%"
239
+ /etc/hosts:
240
+ filesystem: ext4
241
+ device: /dev/sda1
242
+ used_bytes: 5667684352
243
+ available_bytes: 13854396416
244
+ used: "5.28 GiB"
245
+ size: "18.18 GiB"
246
+ options:
247
+ - rw
248
+ - relatime
249
+ - "data=ordered"
250
+ size_bytes: 19522080768
251
+ available: "12.90 GiB"
252
+ capacity: "29.03%"
253
+ /etc/resolv.conf:
254
+ filesystem: ext4
255
+ device: /dev/sda1
256
+ used_bytes: 5667684352
257
+ available_bytes: 13854396416
258
+ used: "5.28 GiB"
259
+ size: "18.18 GiB"
260
+ options:
261
+ - rw
262
+ - relatime
263
+ - "data=ordered"
264
+ size_bytes: 19522080768
265
+ available: "12.90 GiB"
266
+ capacity: "29.03%"
267
+ partitions:
268
+ /dev/sda1:
269
+ mount: /etc/resolv.conf
270
+ size: "18.60 GiB"
271
+ size_bytes: 19970129920
272
+ /dev/sda2:
273
+ size: "954.98 MiB"
274
+ size_bytes: 1001373696
275
+ load_averages:
276
+ "15m": 0.06
277
+ "1m": 0.06
278
+ "5m": 0.05
279
+ disks:
280
+ fd0:
281
+ size: "0 bytes"
282
+ size_bytes: 0
283
+ sda:
284
+ model: "VMware Virtual S"
285
+ size: "19.53 GiB"
286
+ size_bytes: 20971520000
287
+ vendor: "VMware,"
288
+ sr0:
289
+ model: "VMware SATA CD01"
290
+ size: "30.00 MiB"
291
+ size_bytes: 31457280
292
+ vendor: NECVMWar
293
+ dmi:
294
+ bios:
295
+ release_date: "05/20/2014"
296
+ vendor: "Phoenix Technologies LTD"
297
+ version: "6.00"
298
+ board:
299
+ manufacturer: "Intel Corporation"
300
+ product: "440BX Desktop Reference Platform"
301
+ serial_number: None
302
+ chassis:
303
+ asset_tag: "No Asset Tag"
304
+ type: Other
305
+ manufacturer: "VMware, Inc."
306
+ product:
307
+ name: "VMware Virtual Platform"
308
+ serial_number: "VMware-56 4d 25 bb 6b 40 eb bf-38 b3 07 cc d4 45 59 18"
309
+ uuid: "564D25BB-6B40-EBBF-38B3-07CCD4455918"
310
+ serialnumber: "VMware-56 4d 25 bb 6b 40 eb bf-38 b3 07 cc d4 45 59 18"
311
+ environment: production
312
+ facts:
313
+ time: 2016-05-10 13:14:57.080352 -07:00
314
+ environment_name: production
315
+ expiration: 2016-05-10 13:44:57.080364 -07:00
data/spec/prepl_spec.rb CHANGED
@@ -26,4 +26,20 @@ describe 'prepl' do
26
26
  expect(`bundle exec bin/prepl --play #{file_url} --run-once`)
27
27
  .to match(/Puppet::Type::File/)
28
28
  end
29
+
30
+ describe 'remote_node' do
31
+ let(:node_obj) do
32
+ YAML.load_file(File.join(fixtures_dir, 'node_obj.yaml'))
33
+ end
34
+ let(:node_name) do
35
+ 'puppetdev.localdomain'
36
+ end
37
+ before :each do
38
+ allow(PuppetRepl).to receive(:get_remote_node).with(node_name).and_return(node_obj)
39
+ end
40
+ xit do
41
+ expect(`echo 'vars'| bundle exec bin/prepl -n #{node_name}`)
42
+ .to match(/server_facts/)
43
+ end
44
+ end
29
45
  end