facterdb 0.8.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -7
  3. data/README.md +2 -1
  4. data/facts/1.6/centos-7-x86_64.facts +11 -6
  5. data/facts/1.6/oraclelinux-7-x86_64.facts +11 -6
  6. data/facts/1.6/redhat-7-x86_64.facts +11 -6
  7. data/facts/1.6/scientific-7-x86_64.facts +11 -6
  8. data/facts/1.6/sles-15-x86_64.facts +8 -4
  9. data/facts/1.7/centos-7-x86_64.facts +25 -10
  10. data/facts/1.7/oraclelinux-7-x86_64.facts +25 -10
  11. data/facts/1.7/redhat-7-x86_64.facts +25 -10
  12. data/facts/1.7/scientific-7-x86_64.facts +25 -10
  13. data/facts/1.7/sles-15-x86_64.facts +17 -6
  14. data/facts/2.0/centos-7-x86_64.facts +27 -13
  15. data/facts/2.0/oraclelinux-7-x86_64.facts +27 -13
  16. data/facts/2.0/redhat-7-x86_64.facts +27 -13
  17. data/facts/2.0/scientific-7-x86_64.facts +27 -13
  18. data/facts/2.0/sles-15-x86_64.facts +17 -7
  19. data/facts/2.1/centos-7-x86_64.facts +30 -13
  20. data/facts/2.1/oraclelinux-7-x86_64.facts +30 -13
  21. data/facts/2.1/redhat-7-x86_64.facts +30 -13
  22. data/facts/2.1/scientific-7-x86_64.facts +30 -13
  23. data/facts/2.1/sles-15-x86_64.facts +19 -7
  24. data/facts/2.2/centos-7-x86_64.facts +32 -15
  25. data/facts/2.2/oraclelinux-7-x86_64.facts +32 -15
  26. data/facts/2.2/redhat-7-x86_64.facts +32 -15
  27. data/facts/2.2/scientific-7-x86_64.facts +32 -15
  28. data/facts/2.2/sles-15-x86_64.facts +21 -9
  29. data/facts/2.3/centos-7-x86_64.facts +32 -15
  30. data/facts/2.3/oraclelinux-7-x86_64.facts +32 -15
  31. data/facts/2.3/redhat-7-x86_64.facts +32 -15
  32. data/facts/2.3/scientific-7-x86_64.facts +32 -15
  33. data/facts/2.3/sles-15-x86_64.facts +21 -9
  34. data/facts/2.4/centos-7-x86_64.facts +32 -15
  35. data/facts/2.4/oraclelinux-7-x86_64.facts +32 -15
  36. data/facts/2.4/redhat-7-x86_64.facts +32 -15
  37. data/facts/2.4/scientific-7-x86_64.facts +32 -15
  38. data/facts/2.4/sles-15-x86_64.facts +21 -9
  39. data/facts/2.5/centos-7-x86_64.facts +33 -16
  40. data/facts/2.5/oraclelinux-7-x86_64.facts +33 -16
  41. data/facts/2.5/redhat-7-x86_64.facts +33 -16
  42. data/facts/2.5/scientific-7-x86_64.facts +33 -16
  43. data/facts/2.5/sles-15-x86_64.facts +24 -27
  44. data/facts/3.0/centos-7-x86_64.facts +45 -45
  45. data/facts/3.0/debian-6-i386.facts +103 -19
  46. data/facts/3.0/debian-6-x86_64.facts +101 -17
  47. data/facts/3.0/oraclelinux-7-x86_64.facts +45 -45
  48. data/facts/3.0/redhat-7-x86_64.facts +45 -45
  49. data/facts/3.0/scientific-7-x86_64.facts +45 -45
  50. data/facts/3.0/ubuntu-12.04-i386.facts +131 -46
  51. data/facts/3.0/ubuntu-12.04-x86_64.facts +130 -45
  52. data/facts/3.0/windows-7-i386.facts +87 -45
  53. data/facts/3.1/centos-7-x86_64.facts +46 -46
  54. data/facts/3.1/debian-6-i386.facts +107 -22
  55. data/facts/3.1/debian-6-x86_64.facts +105 -20
  56. data/facts/3.1/oraclelinux-7-x86_64.facts +46 -46
  57. data/facts/3.1/redhat-7-x86_64.facts +46 -46
  58. data/facts/3.1/scientific-7-x86_64.facts +46 -46
  59. data/facts/3.1/ubuntu-15.10-i386.facts +168 -44
  60. data/facts/3.1/ubuntu-15.10-x86_64.facts +167 -43
  61. data/facts/3.1/ubuntu-16.04-i386.facts +151 -76
  62. data/facts/3.1/ubuntu-16.04-x86_64.facts +150 -75
  63. data/facts/3.1/windows-7-i386.facts +95 -65
  64. data/facts/3.10/archlinux-x86_64.facts +510 -0
  65. data/facts/3.10/centos-7-x86_64.facts +43 -43
  66. data/facts/3.10/oraclelinux-7-x86_64.facts +43 -43
  67. data/facts/3.10/redhat-7-x86_64.facts +43 -43
  68. data/facts/3.10/scientific-7-x86_64.facts +43 -43
  69. data/facts/3.11/archlinux-x86_64.facts +510 -0
  70. data/facts/3.11/centos-7-x86_64.facts +51 -51
  71. data/facts/3.11/oraclelinux-7-x86_64.facts +51 -51
  72. data/facts/3.11/redhat-7-x86_64.facts +51 -51
  73. data/facts/3.11/scientific-7-x86_64.facts +51 -51
  74. data/facts/3.11/sles-15-x86_64.facts +71 -71
  75. data/facts/3.12/archlinux-x86_64.facts +510 -0
  76. data/facts/3.12/centos-7-x86_64.facts +46 -46
  77. data/facts/3.12/oraclelinux-7-x86_64.facts +46 -46
  78. data/facts/3.12/redhat-7-x86_64.facts +46 -46
  79. data/facts/3.12/scientific-7-x86_64.facts +46 -46
  80. data/facts/3.12/sles-15-x86_64.facts +64 -64
  81. data/facts/3.13/centos-7-x86_64.facts +46 -46
  82. data/facts/3.13/oraclelinux-7-x86_64.facts +46 -46
  83. data/facts/3.13/redhat-7-x86_64.facts +46 -46
  84. data/facts/3.13/scientific-7-x86_64.facts +46 -46
  85. data/facts/3.13/sles-15-x86_64.facts +66 -66
  86. data/facts/3.14/VirtuozzoLinux-7-x86_64.facts +581 -0
  87. data/facts/3.14/archlinux-x86_64.facts +510 -0
  88. data/facts/3.14/centos-7-x86_64.facts +43 -43
  89. data/facts/3.14/oraclelinux-7-x86_64.facts +43 -43
  90. data/facts/3.14/redhat-7-x86_64.facts +43 -43
  91. data/facts/3.14/scientific-7-x86_64.facts +43 -43
  92. data/facts/3.14/sles-15-x86_64.facts +66 -66
  93. data/facts/3.3/centos-7-x86_64.facts +46 -46
  94. data/facts/3.3/oraclelinux-7-x86_64.facts +46 -46
  95. data/facts/3.3/redhat-7-x86_64.facts +46 -46
  96. data/facts/3.3/scientific-7-x86_64.facts +46 -46
  97. data/facts/3.6/centos-7-x86_64.facts +44 -44
  98. data/facts/3.6/oraclelinux-7-x86_64.facts +44 -44
  99. data/facts/3.6/redhat-7-x86_64.facts +44 -44
  100. data/facts/3.6/scientific-7-x86_64.facts +44 -44
  101. data/facts/3.7/centos-7-x86_64.facts +43 -43
  102. data/facts/3.7/oraclelinux-7-x86_64.facts +43 -43
  103. data/facts/3.7/redhat-7-x86_64.facts +43 -43
  104. data/facts/3.7/scientific-7-x86_64.facts +43 -43
  105. data/facts/3.8/centos-7-x86_64.facts +46 -46
  106. data/facts/3.8/oraclelinux-7-x86_64.facts +46 -46
  107. data/facts/3.8/redhat-7-x86_64.facts +46 -46
  108. data/facts/3.8/scientific-7-x86_64.facts +46 -46
  109. data/facts/3.9/archlinux-x86_64.facts +273 -90
  110. data/facts/3.9/centos-7-x86_64.facts +46 -46
  111. data/facts/3.9/oraclelinux-7-x86_64.facts +46 -46
  112. data/facts/3.9/redhat-7-x86_64.facts +46 -46
  113. data/facts/3.9/scientific-7-x86_64.facts +46 -46
  114. data/facts/Vagrantfile +18 -6
  115. data/facts/get_facts.sh +29 -17
  116. data/lib/facterdb/version.rb +1 -1
  117. data/spec/facts_spec.rb +36 -9
  118. data/spec/spec_helper.rb +3 -0
  119. metadata +8 -3
@@ -46,7 +46,7 @@
46
46
  "product": {
47
47
  "name": "VirtualBox",
48
48
  "serial_number": "0",
49
- "uuid": "789AB4E3-A4E5-4E82-A957-96C99EF59F9F"
49
+ "uuid": "CF9646C5-BEAC-40C7-A65E-351F540A3732"
50
50
  }
51
51
  },
52
52
  "domain": "example.com",
@@ -75,7 +75,7 @@
75
75
  "ipaddress": "10.0.2.15",
76
76
  "ipaddress6": "fe80::5054:ff:fe8a:fee6",
77
77
  "ipaddress6_eth0": "fe80::5054:ff:fe8a:fee6",
78
- "ipaddress6_eth1": "fe80::a00:27ff:fe71:c4d5",
78
+ "ipaddress6_eth1": "fe80::a00:27ff:fed1:d28c",
79
79
  "ipaddress6_lo": "::1",
80
80
  "ipaddress_eth0": "10.0.2.15",
81
81
  "ipaddress_eth1": "10.0.0.2",
@@ -86,43 +86,43 @@
86
86
  "kernelrelease": "3.10.0-957.12.2.el7.x86_64",
87
87
  "kernelversion": "3.10.0",
88
88
  "load_averages": {
89
- "15m": 0.14,
90
- "1m": 0.92,
91
- "5m": 0.36
89
+ "15m": 0.46,
90
+ "1m": 1.41,
91
+ "5m": 1.0
92
92
  },
93
93
  "macaddress": "52:54:00:8a:fe:e6",
94
94
  "macaddress_eth0": "52:54:00:8a:fe:e6",
95
- "macaddress_eth1": "08:00:27:71:c4:d5",
95
+ "macaddress_eth1": "08:00:27:d1:d2:8c",
96
96
  "manufacturer": "innotek GmbH",
97
97
  "memory": {
98
98
  "swap": {
99
99
  "available": "2.00 GiB",
100
- "available_bytes": 2146430976,
101
- "capacity": "0.05%",
100
+ "available_bytes": 2145636352,
101
+ "capacity": "0.09%",
102
102
  "total": "2.00 GiB",
103
103
  "total_bytes": 2147479552,
104
- "used": "1.00 MiB",
105
- "used_bytes": 1048576
104
+ "used": "1.76 MiB",
105
+ "used_bytes": 1843200
106
106
  },
107
107
  "system": {
108
- "available": "322.91 MiB",
109
- "available_bytes": 338599936,
110
- "capacity": "33.72%",
108
+ "available": "323.30 MiB",
109
+ "available_bytes": 339005440,
110
+ "capacity": "33.64%",
111
111
  "total": "487.20 MiB",
112
112
  "total_bytes": 510861312,
113
- "used": "164.28 MiB",
114
- "used_bytes": 172261376
113
+ "used": "163.89 MiB",
114
+ "used_bytes": 171855872
115
115
  }
116
116
  },
117
- "memoryfree": "322.91 MiB",
118
- "memoryfree_mb": 322.9140625,
117
+ "memoryfree": "323.30 MiB",
118
+ "memoryfree_mb": 323.30078125,
119
119
  "memorysize": "487.20 MiB",
120
120
  "memorysize_mb": 487.1953125,
121
121
  "mountpoints": {
122
122
  "/": {
123
- "available": "36.78 GiB",
124
- "available_bytes": 39489470464,
125
- "capacity": "8.01%",
123
+ "available": "36.77 GiB",
124
+ "available_bytes": 39479558144,
125
+ "capacity": "8.03%",
126
126
  "device": "/dev/sda1",
127
127
  "filesystem": "xfs",
128
128
  "options": [
@@ -135,8 +135,8 @@
135
135
  ],
136
136
  "size": "39.98 GiB",
137
137
  "size_bytes": 42927656960,
138
- "used": "3.20 GiB",
139
- "used_bytes": 3438186496
138
+ "used": "3.21 GiB",
139
+ "used_bytes": 3448098816
140
140
  },
141
141
  "/dev/shm": {
142
142
  "available": "243.60 MiB",
@@ -275,14 +275,14 @@
275
275
  ],
276
276
  "bindings6": [
277
277
  {
278
- "address": "fe80::a00:27ff:fe71:c4d5",
278
+ "address": "fe80::a00:27ff:fed1:d28c",
279
279
  "netmask": "ffff:ffff:ffff:ffff::",
280
280
  "network": "fe80::"
281
281
  }
282
282
  ],
283
283
  "ip": "10.0.0.2",
284
- "ip6": "fe80::a00:27ff:fe71:c4d5",
285
- "mac": "08:00:27:71:c4:d5",
284
+ "ip6": "fe80::a00:27ff:fed1:d28c",
285
+ "mac": "08:00:27:d1:d2:8c",
286
286
  "mtu": 1500,
287
287
  "netmask": "255.255.255.0",
288
288
  "netmask6": "ffff:ffff:ffff:ffff::",
@@ -387,47 +387,47 @@
387
387
  "ssh": {
388
388
  "ecdsa": {
389
389
  "fingerprints": {
390
- "sha1": "SSHFP 3 1 548297713e47e3d2cabe33650f70ca22987c952c",
391
- "sha256": "SSHFP 3 2 fa046a45efee61177389b94e7ef242df41037f606d98f27629d8d0de55eee76b"
390
+ "sha1": "SSHFP 3 1 cafa8eb011b80d4601e91778307e5a4735a22b7f",
391
+ "sha256": "SSHFP 3 2 bee562160f8a77a8a1eaead755ec133ae750b71b7b18de07e20fe3831c27c524"
392
392
  },
393
- "key": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBB1hvIFMF30V53uLV9quhPf7kykrFxZe8JZGKaETxJ9JqjFge/5Dv9lf6cPQK3rN/jK3mnyPI9l3OMCrY/5l7X0="
393
+ "key": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNPVkisslZxnX8/7gU3KIGSadYpyP5OlhwTvGEHM2SbzV1BC6iiWcNRKg58AKcmBrwnXFIvxp/L/ZRulLHLtEJY="
394
394
  },
395
395
  "ed25519": {
396
396
  "fingerprints": {
397
- "sha1": "SSHFP 4 1 a76095780fb4fee3f0a6de051cfe5cd6c4b68edd",
398
- "sha256": "SSHFP 4 2 9134136f3d93c6ffe1f9edb849cecf908e0f0b314b73553e33c0f4d29d391cf3"
397
+ "sha1": "SSHFP 4 1 fb47fad545ba5f5ab5b1fe11085ac1206016a8c4",
398
+ "sha256": "SSHFP 4 2 f9ea6e8ef032bee74a15a60907722514ea354d432f834e3a966bf5e77edbecec"
399
399
  },
400
- "key": "AAAAC3NzaC1lZDI1NTE5AAAAIKSBO6V3eR4JoYTUu/D4z+bQGENM5FX401aV/wkK49WQ"
400
+ "key": "AAAAC3NzaC1lZDI1NTE5AAAAICCb6gLHU2oA6MoRZuWYY8N/7M5Lh0DvseaQRzceO+E8"
401
401
  },
402
402
  "rsa": {
403
403
  "fingerprints": {
404
- "sha1": "SSHFP 1 1 c13517c894a7b8d377a90e4f822ac983ef7b0297",
405
- "sha256": "SSHFP 1 2 271612abd15fb02789d7c0800b13f1f626e7d25c3503f4f561c3c5b722a33343"
404
+ "sha1": "SSHFP 1 1 082371cce9317e199c3639d6f839adb58778b855",
405
+ "sha256": "SSHFP 1 2 13e54b2a2cad84ca0e240e43635ec157ac734cd1664a163919345e22201e1e9f"
406
406
  },
407
- "key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDVCcGBnzvBNNM+lBukbT9r2ED+I0kfCKal8o14qBeLN/grydADCjGLelddSSc51QAAt7d302DDzbqKwCeVN2dB0TQx4BnOVf1VAKg5MsjfK53C3L2kDPiomkh4SeS5uCevw96nKYHC/MoxQQ3cwVIL1NH78rB/Lr8+MCNlxLRddOW8LL9RYX3yRU8i2puik/GnOnhHoxMW6dVy65t0mnJr6HtuAWseVUQlELgZwn67OwtsacnTOw9saVGj6YsvhZJfYw2g5YeGhYVOgA6XxLk/FXwiCB01GijZCz5SFUtaLsIlsy5MzcNGqEFCktSBS32Iqb1U3TbQgg0P0VTtup6r"
407
+ "key": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDMC57k7Xjw6C+qFVDHFGQ8Dd56AYJTcVU/giIRLAFNSiEWYuBrqySBVZalXhZRpYM5MjFcJTYq+mVO/tJvQ2/3fqTnSgoY1Zr38AsE6A0wMnqx9Iyj/xEArTcGq8L5kgpNiU+eQaFH28NGL2AxAMeV5siWb4izbwIzdrlOZy/OuUt0CwmjpR7AHsaH2GfFFxCLNlDb3aUFGToLaay6VHZCJAwDwsPgxq0qUNOONGnbUANFoWoIc3Xmh1V8piTeIna6fOZf2lWf5WfXlvrVla0RPFLsf4Kd5XBvoD2itcP51hMNtROQQgRmdNWCWxO8TVeiEepDtMtpTaRNRnY3WoYz"
408
408
  }
409
409
  },
410
- "sshecdsakey": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBB1hvIFMF30V53uLV9quhPf7kykrFxZe8JZGKaETxJ9JqjFge/5Dv9lf6cPQK3rN/jK3mnyPI9l3OMCrY/5l7X0=",
411
- "sshed25519key": "AAAAC3NzaC1lZDI1NTE5AAAAIKSBO6V3eR4JoYTUu/D4z+bQGENM5FX401aV/wkK49WQ",
412
- "sshfp_ecdsa": "SSHFP 3 1 548297713e47e3d2cabe33650f70ca22987c952c\nSSHFP 3 2 fa046a45efee61177389b94e7ef242df41037f606d98f27629d8d0de55eee76b",
413
- "sshfp_ed25519": "SSHFP 4 1 a76095780fb4fee3f0a6de051cfe5cd6c4b68edd\nSSHFP 4 2 9134136f3d93c6ffe1f9edb849cecf908e0f0b314b73553e33c0f4d29d391cf3",
414
- "sshfp_rsa": "SSHFP 1 1 c13517c894a7b8d377a90e4f822ac983ef7b0297\nSSHFP 1 2 271612abd15fb02789d7c0800b13f1f626e7d25c3503f4f561c3c5b722a33343",
415
- "sshrsakey": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDVCcGBnzvBNNM+lBukbT9r2ED+I0kfCKal8o14qBeLN/grydADCjGLelddSSc51QAAt7d302DDzbqKwCeVN2dB0TQx4BnOVf1VAKg5MsjfK53C3L2kDPiomkh4SeS5uCevw96nKYHC/MoxQQ3cwVIL1NH78rB/Lr8+MCNlxLRddOW8LL9RYX3yRU8i2puik/GnOnhHoxMW6dVy65t0mnJr6HtuAWseVUQlELgZwn67OwtsacnTOw9saVGj6YsvhZJfYw2g5YeGhYVOgA6XxLk/FXwiCB01GijZCz5SFUtaLsIlsy5MzcNGqEFCktSBS32Iqb1U3TbQgg0P0VTtup6r",
410
+ "sshecdsakey": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNPVkisslZxnX8/7gU3KIGSadYpyP5OlhwTvGEHM2SbzV1BC6iiWcNRKg58AKcmBrwnXFIvxp/L/ZRulLHLtEJY=",
411
+ "sshed25519key": "AAAAC3NzaC1lZDI1NTE5AAAAICCb6gLHU2oA6MoRZuWYY8N/7M5Lh0DvseaQRzceO+E8",
412
+ "sshfp_ecdsa": "SSHFP 3 1 cafa8eb011b80d4601e91778307e5a4735a22b7f\nSSHFP 3 2 bee562160f8a77a8a1eaead755ec133ae750b71b7b18de07e20fe3831c27c524",
413
+ "sshfp_ed25519": "SSHFP 4 1 fb47fad545ba5f5ab5b1fe11085ac1206016a8c4\nSSHFP 4 2 f9ea6e8ef032bee74a15a60907722514ea354d432f834e3a966bf5e77edbecec",
414
+ "sshfp_rsa": "SSHFP 1 1 082371cce9317e199c3639d6f839adb58778b855\nSSHFP 1 2 13e54b2a2cad84ca0e240e43635ec157ac734cd1664a163919345e22201e1e9f",
415
+ "sshrsakey": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDMC57k7Xjw6C+qFVDHFGQ8Dd56AYJTcVU/giIRLAFNSiEWYuBrqySBVZalXhZRpYM5MjFcJTYq+mVO/tJvQ2/3fqTnSgoY1Zr38AsE6A0wMnqx9Iyj/xEArTcGq8L5kgpNiU+eQaFH28NGL2AxAMeV5siWb4izbwIzdrlOZy/OuUt0CwmjpR7AHsaH2GfFFxCLNlDb3aUFGToLaay6VHZCJAwDwsPgxq0qUNOONGnbUANFoWoIc3Xmh1V8piTeIna6fOZf2lWf5WfXlvrVla0RPFLsf4Kd5XBvoD2itcP51hMNtROQQgRmdNWCWxO8TVeiEepDtMtpTaRNRnY3WoYz",
416
416
  "swapfree": "2.00 GiB",
417
- "swapfree_mb": 2046.99609375,
417
+ "swapfree_mb": 2046.23828125,
418
418
  "swapsize": "2.00 GiB",
419
419
  "swapsize_mb": 2047.99609375,
420
420
  "system_uptime": {
421
421
  "days": 0,
422
422
  "hours": 0,
423
- "seconds": 185,
424
- "uptime": "0:03 hours"
423
+ "seconds": 332,
424
+ "uptime": "0:05 hours"
425
425
  },
426
426
  "timezone": "UTC",
427
- "uptime": "0:03 hours",
427
+ "uptime": "0:05 hours",
428
428
  "uptime_days": 0,
429
429
  "uptime_hours": 0,
430
- "uptime_seconds": 185,
431
- "uuid": "789AB4E3-A4E5-4E82-A957-96C99EF59F9F",
430
+ "uptime_seconds": 332,
431
+ "uuid": "CF9646C5-BEAC-40C7-A65E-351F540A3732",
432
432
  "virtual": "virtualbox"
433
433
  }
data/facts/Vagrantfile CHANGED
@@ -13,7 +13,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
13
13
 
14
14
  config.vm.define "debian-6-x86_64" do |host|
15
15
  host.vm.box = "puppetlabs/debian-6.0.10-64-nocm"
16
- host.vm.provision "shell", inline: "apt-get update && apt-get install -y ruby rubygems"
16
+ host.vm.provision "shell", inline: [
17
+ "echo 'deb [allow-insecure=yes,trusted=yes] http://archive.debian.org/debian squeeze main' > /etc/apt/sources.list",
18
+ "echo 'deb [allow-insecure=yes,trusted=yes] http://archive.debian.org/debian-security squeeze/updates main contrib' >> /etc/apt/sources.list",
19
+ "apt-get update",
20
+ "apt-get install -y --force-yes ruby rubygems",
21
+ ].join(' && ')
17
22
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
18
23
  host.vm.provision "shell", path: "get_facts.sh"
19
24
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
@@ -80,7 +85,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
80
85
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
81
86
  end
82
87
  config.vm.define "ubuntu-15.10-x86_64" do |host|
83
- host.vm.box = "ubuntu/wily64"
88
+ host.vm.box = "sgallen/wily64"
89
+ host.vm.network :private_network, ip: '10.0.0.2'
90
+ host.vm.synced_folder ".", "/vagrant", :nfs => true
84
91
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
85
92
  host.vm.provision "shell", path: "get_facts.sh"
86
93
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
@@ -130,7 +137,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
130
137
  host.vm.box = "centos/7"
131
138
  host.vm.network :private_network, ip: '10.0.0.2'
132
139
  host.vm.synced_folder ".", "/vagrant", :nfs => true
133
- host.vm.provision "shell", inline: "yum -y install ruby-devel gcc wget"
140
+ host.vm.provision "shell", inline: "yum -y install ruby-devel gcc wget net-tools"
134
141
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
135
142
  host.vm.provision "shell", path: "get_facts.sh"
136
143
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
@@ -143,7 +150,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
143
150
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
144
151
  end
145
152
  config.vm.define "fedora-19-x86_64" do |host|
146
- host.vm.box = "chef/fedora-19"
153
+ host.vm.box = "rafacas/fedora19-plain"
147
154
  host.vm.provision "shell", inline: "yum -y install ruby ruby-devel"
148
155
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
149
156
  host.vm.provision "shell", path: "get_facts.sh"
@@ -211,8 +218,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
211
218
  config.vm.define "archlinux-x86_64" do |host|
212
219
  host.vm.box = "archlinux/archlinux"
213
220
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
214
- host.vm.provision "shell", path: "get_facts.sh"
215
- host.vm.provision "shell", inline: "/sbin/shutdown -h now"
221
+ #host.vm.provision "shell", path: "get_facts.sh"
222
+ #host.vm.provision "shell", inline: "/sbin/shutdown -h now"
216
223
  end
217
224
  config.vm.define "sles-11sp1-x86_64" do |host|
218
225
  host.vm.box = "suse/sles11sp3"
@@ -231,6 +238,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
231
238
  config.vm.define "sles-15-x86_64" do |host|
232
239
  host.vm.box = "trueability/sles-15-sp1"
233
240
  host.vm.provision "file", source: "Gemfile", destination: "Gemfile"
241
+ host.vm.provision "shell", inline: [
242
+ "SUSEConnect -p sle-module-desktop-applications/15.1/x86_64",
243
+ "SUSEConnect -p sle-module-legacy/15.1/x86_64",
244
+ "zypper install --no-confirm net-tools-deprecated",
245
+ ].join(' && ')
234
246
  host.vm.provision "shell", path: "get_facts.sh"
235
247
  host.vm.provision "shell", inline: "/sbin/shutdown -h now"
236
248
  end
data/facts/get_facts.sh CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  export PATH=/opt/puppetlabs/bin:$PATH
4
4
 
5
+ apt_install() {
6
+ DEBIAN_FRONTEND=noninteractive \
7
+ apt-get --option Dpkg::Options::="--force-confdef" \
8
+ --option Dpkg::Options::="--force-confnew" \
9
+ install --yes --force-yes "$@"
10
+ }
11
+
5
12
  if test -f /usr/bin/zypper; then
6
13
  zypper --non-interactive --gpg-auto-import-keys refresh
7
14
  zypper --non-interactive install ruby-devel
@@ -16,7 +23,7 @@ if test -f /usr/bin/zypper; then
16
23
  fi
17
24
  elif test -f /usr/bin/apt-get; then
18
25
  apt-get update
19
- apt-get install -y lsb-release
26
+ apt_install lsb-release
20
27
  lsbdistcodename=$(lsb_release -sc)
21
28
  operatingsystem=$(lsb_release -si)
22
29
  operatingsystemmajrelease=$(lsb_release -sr)
@@ -136,13 +143,13 @@ case "${osfamily}" in
136
143
  if [[ "tessa" =~ ${lsbdistcodename} ]]; then
137
144
  lsbdistcodename='bionic'
138
145
  fi
139
- apt-get install -y wget
140
- wget "https://apt.puppetlabs.com/puppetlabs-release-pc1-${lsbdistcodename}.deb" -O /tmp/puppetlabs-release-pc1.deb
141
- if test -f /tmp/puppetlabs-release.deb; then
146
+ apt_install curl
147
+ curl "https://apt.puppetlabs.com/puppetlabs-release-pc1-${lsbdistcodename}.deb" -o /tmp/puppetlabs-release-pc1.deb
148
+ if test "$?" -eq 0 -a -f /tmp/puppetlabs-release-pc1.deb; then
142
149
  dpkg --install /tmp/puppetlabs-release-pc1.deb
143
150
  apt-get update
144
- for puppet_agent_version in 1.2.2 1.4.2 1.5.3; do
145
- if apt-get -y --force-yes install puppet-agent=${puppet_agent_version}*; then
151
+ for puppet_agent_version in 1.2.2 1.4 1.5 1.7 1.8 1.10; do
152
+ if apt_install puppet-agent=${puppet_agent_version}*; then
146
153
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
147
154
  mkdir -p $(dirname ${output_file})
148
155
  facter --show-legacy -p -j | tee ${output_file}
@@ -150,12 +157,12 @@ case "${osfamily}" in
150
157
  done
151
158
  apt-get -y remove --purge puppetlabs-release-pc1
152
159
  fi
153
- wget "https://apt.puppetlabs.com/puppet5-release-${lsbdistcodename}.deb" -O /tmp/puppet5-release.deb
154
- if test -f /tmp/puppet5-release.deb; then
160
+ curl "https://apt.puppetlabs.com/puppet5-release-${lsbdistcodename}.deb" -o /tmp/puppet5-release.deb
161
+ if test "$?" -eq 0 -a -f /tmp/puppet5-release.deb; then
155
162
  dpkg --install /tmp/puppet5-release.deb
156
163
  apt-get update
157
- for puppet_agent_version in 5.0.1 5.1.0 5.3.7 5.4.0 5.5.3; do
158
- if apt-get -y --force-yes install puppet-agent=${puppet_agent_version}*; then
164
+ for puppet_agent_version in 5.0 5.1 5.3 5.4 5.5; do
165
+ if apt_install puppet-agent=${puppet_agent_version}*; then
159
166
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
160
167
  mkdir -p $(dirname ${output_file})
161
168
  facter --show-legacy -p -j | tee ${output_file}
@@ -163,12 +170,12 @@ case "${osfamily}" in
163
170
  done
164
171
  apt-get -y remove --purge puppet5-release
165
172
  fi
166
- wget "https://apt.puppetlabs.com/puppet6-release-${lsbdistcodename}.deb" -O /tmp/puppet6-release.deb
167
- if test -f /tmp/puppet6-release.deb; then
173
+ curl "https://apt.puppetlabs.com/puppet6-release-${lsbdistcodename}.deb" -o /tmp/puppet6-release.deb
174
+ if test "$?" -eq 0 -a -f /tmp/puppet6-release.deb; then
168
175
  dpkg --install /tmp/puppet6-release.deb
169
176
  apt-get update
170
- for puppet_agent_version in 6.2.0 6.4.2 6.6.0; do
171
- if apt-get -y --force-yes install puppet-agent=${puppet_agent_version}*; then
177
+ for puppet_agent_version in 6.2 6.4 6.6; do
178
+ if apt_install puppet-agent=${puppet_agent_version}*; then
172
179
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
173
180
  mkdir -p $(dirname ${output_file})
174
181
  facter --show-legacy -p -j | tee ${output_file}
@@ -176,12 +183,12 @@ case "${osfamily}" in
176
183
  done
177
184
  apt-get -y remove --purge puppet6-release
178
185
  fi
179
- apt-get install -y make gcc libgmp-dev
186
+ apt_install make gcc libgmp-dev
180
187
 
181
188
  # There are no puppet-agent packages for Buster yet, so generate a Facter 3.x
182
189
  # fact set from the official Debian package.
183
190
  if [[ "buster" = "${lsbdistcodename}" ]]; then
184
- apt-get install -y ruby rubygems ruby-dev puppet facter
191
+ apt_install ruby rubygems ruby-dev puppet facter
185
192
  output_file="/vagrant/$(facter --version | cut -d. -f1,2)/$(facter operatingsystem | tr '[:upper:]' '[:lower:]')-$(facter operatingsystemmajrelease)-$(facter hardwaremodel).facts"
186
193
  mkdir -p $(dirname ${output_file})
187
194
  facter --show-legacy -p -j | tee ${output_file}
@@ -264,7 +271,12 @@ hardwaremodel=$(facter hardwaremodel)
264
271
  [ "${hardwaremodel}" = 'amd64' ] && hardwaremodel=x86_64
265
272
 
266
273
  PATH=/opt/puppetlabs/puppet/bin:$PATH
267
- gem install bundler --no-ri --no-rdoc --no-format-executable
274
+
275
+ if ruby -e 'puts RUBY_VERSION' | grep -e '^2\.3'; then
276
+ gem install bundler --no-ri --no-rdoc --no-format-executable
277
+ else
278
+ gem install bundler --version '~> 1.0' --no-ri --no-rdoc --no-format-executable
279
+ fi
268
280
  bundle install --path vendor/bundler
269
281
 
270
282
  for version in 1.6.0 1.7.0 2.0.0 2.1.0 2.2.0 2.3.0 2.4.0 2.5.0; do
@@ -1,5 +1,5 @@
1
1
  module FacterDB
2
2
  module Version
3
- STRING = '0.8.2'
3
+ STRING = '1.0.0'
4
4
  end
5
5
  end
data/spec/facts_spec.rb CHANGED
@@ -59,22 +59,49 @@ describe 'Default Facts' do
59
59
  expect(file_hashes[file_hash]).to have_a_unique_hash
60
60
  end
61
61
  end
62
+ end
62
63
 
63
- it 'should contain fact sets which match are valid JSON' do
64
- FacterDB.default_fact_files.each do |filepath|
64
+ KNOWN_IPADDRESS_PENDING = {
65
+ 'facts/1.6/fedora-19-i386.facts' => 'unable to regenerate facts',
66
+ 'facts/1.6/fedora-19-x86_64.facts' => 'unable to regenerate facts',
67
+ 'facts/2.1/archlinux-x86_64.facts' => 'no ifconfig package',
68
+ 'facts/3.10/ubuntu-18.04-aarch64.facts' => 'unable to regenerate facts',
69
+ 'facts/1.6/archlinux-x86_64.facts' => 'no ifconfig package',
70
+ 'facts/2.4/archlinux-x86_64.facts' => 'no ifconfig package',
71
+ 'facts/3.2/aix-61-powerpc.facts' => 'unable to regenerate facts',
72
+ 'facts/3.2/aix-71-powerpc.facts' => 'unable to regenerate facts',
73
+ 'facts/3.2/aix-53-powerpc.facts' => 'unable to regenerate facts',
74
+ 'facts/2.3/archlinux-x86_64.facts' => 'no ifconfig package',
75
+ 'facts/2.5/archlinux-x86_64.facts' => 'no ifconfig package',
76
+ 'facts/1.7/archlinux-x86_64.facts' => 'no ifconfig package',
77
+ 'facts/2.0/archlinux-x86_64.facts' => 'no ifconfig package',
78
+ 'facts/2.2/archlinux-x86_64.facts' => 'no ifconfig package',
79
+ 'facts/3.6/pcs-6-x86_64.facts' => 'unable to regenerate facts',
80
+ 'facts/3.0/ubuntu-15.10-x86_64.facts' => 'no puppet-agent package',
81
+ 'facts/3.0/ubuntu-15.10-i386.facts' => 'no puppet-agent package',
82
+ }
83
+
84
+ project_dir = Pathname.new(__dir__).parent
85
+ FacterDB.default_fact_files.each do |filepath|
86
+ relative_path = Pathname.new(filepath).relative_path_from(project_dir).to_s
87
+ describe relative_path do
88
+ subject(:content) do
89
+ JSON.parse(File.open(filepath, 'rb') { |file| file.read })
90
+ end
91
+
92
+ it 'contains a valid JSON document' do
65
93
  expect(filepath).to be_valid_json
66
94
  end
67
- end
68
95
 
69
- it 'should contain fact sets which match the facter version' do
70
- FacterDB.default_fact_files.each do |filepath|
96
+ it 'contains a fact set which matches the facter version' do
71
97
  facter_dir_path = File.basename(File.dirname(filepath))
72
98
 
73
- content = File.open(filepath, 'rb') { |file| file.read }
74
- obj = JSON.parse(content)
75
- file_facter_version = obj['facterversion']
99
+ expect(content['facterversion']).to have_facter_version(facter_dir_path, filepath)
100
+ end
76
101
 
77
- expect(file_facter_version).to have_facter_version(facter_dir_path, filepath)
102
+ it 'contains an ipaddress fact' do
103
+ pending KNOWN_IPADDRESS_PENDING[relative_path] if KNOWN_IPADDRESS_PENDING.key?(relative_path)
104
+ expect(content['ipaddress']).to not_be_nil.and not_be_empty
78
105
  end
79
106
  end
80
107
  end
data/spec/spec_helper.rb CHANGED
@@ -12,6 +12,9 @@ require 'rspec'
12
12
  require 'facterdb'
13
13
  include FacterDB
14
14
 
15
+ RSpec::Matchers.define_negated_matcher :not_be_nil, :be_nil
16
+ RSpec::Matchers.define_negated_matcher :not_be_empty, :be_empty
17
+
15
18
  def project_dir
16
19
  File.dirname File.dirname(File.expand_path(__FILE__))
17
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facterdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickaël Canévet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-28 00:00:00.000000000 Z
11
+ date: 2019-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -1081,6 +1081,7 @@ files:
1081
1081
  - facts/3.1/windows-7-i386.facts
1082
1082
  - facts/3.1/windows-7-x86_64.facts
1083
1083
  - facts/3.1/windows-8.1-x86_64.facts
1084
+ - facts/3.10/archlinux-x86_64.facts
1084
1085
  - facts/3.10/centos-5-i386.facts
1085
1086
  - facts/3.10/centos-5-x86_64.facts
1086
1087
  - facts/3.10/centos-6-i386.facts
@@ -1123,6 +1124,7 @@ files:
1123
1124
  - facts/3.10/windows-2012-x86_64.facts
1124
1125
  - facts/3.10/windows-2016-x86_64.facts
1125
1126
  - facts/3.10/windows-2019-x86_64.facts
1127
+ - facts/3.11/archlinux-x86_64.facts
1126
1128
  - facts/3.11/centos-5-i386.facts
1127
1129
  - facts/3.11/centos-5-x86_64.facts
1128
1130
  - facts/3.11/centos-6-i386.facts
@@ -1177,6 +1179,7 @@ files:
1177
1179
  - facts/3.11/windows-2012-x86_64.facts
1178
1180
  - facts/3.11/windows-2016-x86_64.facts
1179
1181
  - facts/3.11/windows-2019-x86_64.facts
1182
+ - facts/3.12/archlinux-x86_64.facts
1180
1183
  - facts/3.12/centos-6-x86_64.facts
1181
1184
  - facts/3.12/centos-7-x86_64.facts
1182
1185
  - facts/3.12/darwin-16-x86_64.facts
@@ -1244,6 +1247,8 @@ files:
1244
1247
  - facts/3.13/windows-2012-x86_64.facts
1245
1248
  - facts/3.13/windows-2016-x86_64.facts
1246
1249
  - facts/3.13/windows-2019-x86_64.facts
1250
+ - facts/3.14/VirtuozzoLinux-7-x86_64.facts
1251
+ - facts/3.14/archlinux-x86_64.facts
1247
1252
  - facts/3.14/centos-6-x86_64.facts
1248
1253
  - facts/3.14/centos-7-x86_64.facts
1249
1254
  - facts/3.14/darwin-16-x86_64.facts
@@ -1693,7 +1698,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1693
1698
  version: '0'
1694
1699
  requirements: []
1695
1700
  rubyforge_project:
1696
- rubygems_version: 2.7.7
1701
+ rubygems_version: 2.7.6.2
1697
1702
  signing_key:
1698
1703
  specification_version: 4
1699
1704
  summary: A Database of OS facts provided by Facter