facter 2.1.0-x64-mingw32 → 2.2.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of facter might be problematic. Click here for more details.

Files changed (139) hide show
  1. data/COMMITTERS.md +25 -34
  2. data/CONTRIBUTING.md +27 -5
  3. data/README.md +32 -0
  4. data/ext/build_defaults.yaml +1 -1
  5. data/ext/debian/control +3 -2
  6. data/ext/osx/file_mapping.yaml +5 -0
  7. data/ext/redhat/facter.spec.erb +4 -1
  8. data/lib/facter/Cfkey.rb +2 -2
  9. data/lib/facter/architecture.rb +2 -2
  10. data/lib/facter/augeasversion.rb +2 -2
  11. data/lib/facter/blockdevices.rb +12 -12
  12. data/lib/facter/dhcp_servers.rb +4 -4
  13. data/lib/facter/domain.rb +4 -4
  14. data/lib/facter/ec2.rb +17 -0
  15. data/lib/facter/ec2/rest.rb +2 -2
  16. data/lib/facter/facterversion.rb +2 -2
  17. data/lib/facter/filesystems.rb +10 -3
  18. data/lib/facter/fqdn.rb +1 -1
  19. data/lib/facter/gid.rb +16 -0
  20. data/lib/facter/hardwareisa.rb +3 -3
  21. data/lib/facter/hardwaremodel.rb +3 -3
  22. data/lib/facter/hostname.rb +1 -1
  23. data/lib/facter/id.rb +4 -4
  24. data/lib/facter/interfaces.rb +3 -0
  25. data/lib/facter/ipaddress6.rb +9 -9
  26. data/lib/facter/kernel.rb +2 -2
  27. data/lib/facter/kernelmajversion.rb +2 -2
  28. data/lib/facter/kernelrelease.rb +4 -4
  29. data/lib/facter/kernelversion.rb +3 -3
  30. data/lib/facter/ldom.rb +11 -0
  31. data/lib/facter/lsbdistcodename.rb +8 -4
  32. data/lib/facter/lsbdistdescription.rb +6 -10
  33. data/lib/facter/lsbdistid.rb +8 -4
  34. data/lib/facter/lsbdistrelease.rb +8 -4
  35. data/lib/facter/lsbmajdistrelease.rb +7 -12
  36. data/lib/facter/lsbminordistrelease.rb +22 -0
  37. data/lib/facter/lsbrelease.rb +8 -4
  38. data/lib/facter/macaddress.rb +1 -0
  39. data/lib/facter/macosx.rb +1 -1
  40. data/lib/facter/manufacturer.rb +3 -3
  41. data/lib/facter/memory.rb +8 -8
  42. data/lib/facter/netmask.rb +2 -1
  43. data/lib/facter/network.rb +3 -3
  44. data/lib/facter/operatingsystem.rb +9 -126
  45. data/lib/facter/operatingsystem/base.rb +61 -0
  46. data/lib/facter/operatingsystem/cumuluslinux.rb +27 -0
  47. data/lib/facter/operatingsystem/implementation.rb +30 -0
  48. data/lib/facter/operatingsystem/linux.rb +467 -0
  49. data/lib/facter/operatingsystem/sunos.rb +54 -0
  50. data/lib/facter/operatingsystem/vmkernel.rb +11 -0
  51. data/lib/facter/operatingsystem/windows.rb +37 -0
  52. data/lib/facter/operatingsystemmajrelease.rb +14 -33
  53. data/lib/facter/operatingsystemrelease.rb +14 -235
  54. data/lib/facter/os.rb +69 -0
  55. data/lib/facter/osfamily.rb +4 -23
  56. data/lib/facter/partitions.rb +4 -3
  57. data/lib/facter/path.rb +2 -2
  58. data/lib/facter/physicalprocessorcount.rb +10 -74
  59. data/lib/facter/processor.rb +13 -129
  60. data/lib/facter/processors.rb +60 -0
  61. data/lib/facter/processors/os.rb +234 -0
  62. data/lib/facter/ps.rb +5 -4
  63. data/lib/facter/puppetversion.rb +1 -1
  64. data/lib/facter/rackspace.rb +34 -0
  65. data/lib/facter/rubysitedir.rb +3 -0
  66. data/lib/facter/rubyversion.rb +2 -2
  67. data/lib/facter/selinux.rb +57 -2
  68. data/lib/facter/ssh.rb +1 -0
  69. data/lib/facter/system_uptime.rb +42 -0
  70. data/lib/facter/timezone.rb +1 -1
  71. data/lib/facter/uptime.rb +5 -23
  72. data/lib/facter/uptime_days.rb +4 -6
  73. data/lib/facter/uptime_hours.rb +4 -6
  74. data/lib/facter/uptime_seconds.rb +5 -9
  75. data/lib/facter/util/formatter.rb +1 -1
  76. data/lib/facter/util/manufacturer.rb +1 -1
  77. data/lib/facter/util/partitions.rb +3 -1
  78. data/lib/facter/util/partitions/linux.rb +1 -1
  79. data/lib/facter/util/partitions/openbsd.rb +35 -0
  80. data/lib/facter/util/uptime.rb +4 -3
  81. data/lib/facter/util/virtual.rb +3 -1
  82. data/lib/facter/util/xendomains.rb +12 -3
  83. data/lib/facter/version.rb +1 -1
  84. data/lib/facter/virtual.rb +24 -23
  85. data/lib/facter/vlans.rb +1 -1
  86. data/lib/facter/xendomains.rb +1 -1
  87. data/lib/facter/zfs_version.rb +6 -2
  88. data/lib/facter/zones.rb +6 -5
  89. data/lib/facter/zpool_version.rb +1 -1
  90. data/spec/fixtures/cpuinfo/amd64dual-grep +2 -0
  91. data/spec/fixtures/cpuinfo/amd64twentyfour-grep +24 -0
  92. data/spec/fixtures/cpuinfo/two_multicore-grep +4 -0
  93. data/spec/fixtures/cpuinfo/two_singlecore-grep +2 -0
  94. data/spec/fixtures/unit/processors/os/darwin-system-profiler +287 -0
  95. data/spec/fixtures/unit/zfs_version/zfs_new +61 -0
  96. data/spec/fixtures/unit/zfs_version/zfs_old +43 -0
  97. data/spec/fixtures/unit/zfs_version/zfsonlinux_0.6.1 +13 -0
  98. data/spec/fixtures/unit/zpool_version/zfsonlinux_0.6.1 +48 -0
  99. data/spec/unit/ec2/rest_spec.rb +6 -6
  100. data/spec/unit/gid_spec.rb +22 -0
  101. data/spec/unit/hardwaremodel_spec.rb +2 -0
  102. data/spec/unit/lsbdistcodename_spec.rb +22 -17
  103. data/spec/unit/lsbdistdescription_spec.rb +22 -17
  104. data/spec/unit/lsbdistid_spec.rb +23 -18
  105. data/spec/unit/lsbdistrelease_spec.rb +22 -17
  106. data/spec/unit/lsbmajdistrelease_spec.rb +23 -6
  107. data/spec/unit/lsbminordistrelease_spec.rb +31 -0
  108. data/spec/unit/lsbrelease_spec.rb +22 -17
  109. data/spec/unit/macaddress_spec.rb +3 -0
  110. data/spec/unit/operatingsystem/base_spec.rb +76 -0
  111. data/spec/unit/operatingsystem/cumuluslinux_spec.rb +40 -0
  112. data/spec/unit/operatingsystem/implementation_spec.rb +49 -0
  113. data/spec/unit/operatingsystem/linux_spec.rb +538 -0
  114. data/spec/unit/operatingsystem/sunos_spec.rb +144 -0
  115. data/spec/unit/operatingsystem/vmkernel_spec.rb +13 -0
  116. data/spec/unit/operatingsystem/windows_spec.rb +68 -0
  117. data/spec/unit/operatingsystem_spec.rb +10 -153
  118. data/spec/unit/operatingsystemmajrelease_spec.rb +14 -31
  119. data/spec/unit/operatingsystemrelease_spec.rb +13 -229
  120. data/spec/unit/os_spec.rb +131 -0
  121. data/spec/unit/osfamily_spec.rb +9 -54
  122. data/spec/unit/partitions_spec.rb +41 -3
  123. data/spec/unit/physicalprocessorcount_spec.rb +6 -78
  124. data/spec/unit/processor_spec.rb +18 -381
  125. data/spec/unit/processors/os_spec.rb +446 -0
  126. data/spec/unit/processors_spec.rb +203 -0
  127. data/spec/unit/rackspace_spec.rb +40 -0
  128. data/spec/unit/system_uptime_spec.rb +80 -0
  129. data/spec/unit/util/formatter_spec.rb +5 -0
  130. data/spec/unit/util/macaddress_spec.rb +2 -0
  131. data/spec/unit/util/processor_spec.rb +120 -0
  132. data/spec/unit/util/uptime_spec.rb +3 -4
  133. data/spec/unit/util/virtual_spec.rb +8 -0
  134. data/spec/unit/util/xendomains_spec.rb +54 -9
  135. data/spec/unit/virtual_spec.rb +8 -1
  136. data/spec/unit/zfs_version_spec.rb +20 -8
  137. data/spec/unit/zpool_version_spec.rb +5 -0
  138. metadata +658 -589
  139. checksums.yaml +0 -7
data/COMMITTERS.md CHANGED
@@ -5,7 +5,7 @@ We would like to make it easier for community members to contribute to facter
5
5
  using pull requests, even if it makes the task of reviewing and committing
6
6
  these changes a little harder. Pull requests are only ever based on a single
7
7
  branch, however, we maintain more than one active branch. As a result
8
- contributors should target their changes at the facter-2 branch. This makes the
8
+ contributors should target their changes at the master branch. This makes the
9
9
  process of contributing a little easier for the contributor since they don't
10
10
  need to concern themselves with the question, "What branch do I base my changes
11
11
  on?" This is already called out in the [CONTRIBUTING.md](http://goo.gl/XRH2J).
@@ -37,7 +37,8 @@ making the decision what base branch to merge the change set into.
37
37
 
38
38
  **base branch** - A branch in Git that contains an active history of changes
39
39
  and will eventually be released using semantic version guidelines. The branch
40
- named master will always exist as a base branch.
40
+ named master will always exist as a base branch. All other base branches will
41
+ be associated with a specific released version of facter, e.g. 1.6.x and 1.7.x.
41
42
 
42
43
  Committer Guide
43
44
  ====
@@ -96,7 +97,7 @@ branch:
96
97
  documentation being kept up to date?
97
98
  * Does the change set include clean code? (software code that is formatted
98
99
  correctly and in an organized manner so that another coder can easily read
99
- or modify it.) HINT: `git diff --check`
100
+ or modify it.) HINT: `git diff master --check`
100
101
  * Does the change set conform to the contributing guide?
101
102
 
102
103
 
@@ -112,9 +113,9 @@ paying attention to our automated build tools.
112
113
  * Watch the build until your changes have gone through green
113
114
  * Update the ticket status and target version. The target version field in
114
115
  our issue tracker should be updated to be the next release of facter. For
115
- example, if the most recent release of facter is 2.0.1 and you merge a
116
- backwards compatible change set into facter-2, then the target version should
117
- be 2.1.0 in the issue tracker.)
116
+ example, if the most recent release of facter is 1.6.17 and you merge a
117
+ backwards compatible change set into master, then the target version should
118
+ be 1.7.0 in the issue tracker.)
118
119
  * Ensure the pull request is closed (Hint: amend your merge commit to contain
119
120
  the string `closes #123` where 123 is the pull request number.
120
121
 
@@ -125,11 +126,11 @@ This section helps a committer rebase a contribution onto an earlier base
125
126
  branch, then merge into the base branch and up through all active base
126
127
  branches.
127
128
 
128
- Suppose a contributor submits a pull request based on facter-2. The change set
129
- fixes a bug reported against facter 2.0.1 which is the most recently released
129
+ Suppose a contributor submits a pull request based on master. The change set
130
+ fixes a bug reported against facter 1.7.1 which is the most recently released
130
131
  version of facter.
131
132
 
132
- In this example the committer should rebase the change set onto the stable
133
+ In this example the committer should rebase the change set onto the 1.7.x
133
134
  branch since this is a bug rather than new functionality.
134
135
 
135
136
  First, the committer pulls down the branch using the `hub` gem. This tool
@@ -140,55 +141,45 @@ branch to track the remote branch.
140
141
  Branch jeffmccune-fix_foo_error set up to track remote branch fix_foo_error from jeffmccune.
141
142
  Switched to a new branch 'jeffmccune-fix_foo_error'
142
143
 
143
- At this point the topic branch is a descendant of facter-2, but we want it to
144
- descend from stable. The committer creates a new branch then re-bases the
144
+ At this point the topic branch is a descendant of master, but we want it to
145
+ descend from 1.7.x. The committer creates a new branch then re-bases the
145
146
  change set:
146
147
 
147
- $ git branch bug/stable/fix_foo_error
148
- $ git rebase --onto stable master bug/stable/fix_foo_error
148
+ $ git branch bug/1.7.x/fix_foo_error
149
+ $ git rebase --onto 1.7.x master bug/1.7.x/fix_foo_error
149
150
  First, rewinding head to replay your work on top of it...
150
- Applying: (#23456) Fix FooError that always bites users in 2.0.1
151
+ Applying: (#23456) Fix FooError that always bites users in 1.7.1
151
152
 
152
153
  The `git rebase` command may be interpreted as, "First, check out the branch
153
- named `bug/stable/fix_foo_error`, then take the changes that were previously
154
- based on `facter-2` and re-base them onto `stable`.
154
+ named `bug/1.7.x/fix_foo_error`, then take the changes that were previously
155
+ based on `master` and re-base them onto `1.7.x`.
155
156
 
156
157
  Now that we have a topic branch containing the change set based on the correct
157
158
  release branch, the committer merges in:
158
159
 
159
- $ git checkout stable
160
- Switched to branch 'stable'
161
- $ git merge --no-ff --log bug/stable/fix_foo_error
160
+ $ git checkout 1.7.x
161
+ Switched to branch '1.7.x'
162
+ $ git merge --no-ff --log bug/1.7.x/fix_foo_error
162
163
  Merge made by the 'recursive' strategy.
163
164
  foo | 0
164
165
  1 file changed, 0 insertions(+), 0 deletions(-)
165
166
  create mode 100644 foo
166
167
 
167
- Once merged into the first base branch, the committer merges up to facter-2:
168
-
169
- $ git checkout facter-2
170
- Switched to branch 'facter-2'
171
- $ git merge --no-ff --log stable
172
- Merge made by the 'recursive' strategy.
173
- foo | 0
174
- 1 file changed, 0 insertions(+), 0 deletions(-)
175
- create mode 100644 foo
176
-
177
- And then merges up to master:
168
+ Once merged into the first base branch, the committer merges up:
178
169
 
179
170
  $ git checkout master
180
171
  Switched to branch 'master'
181
- $ git merge --no-ff --log stable
172
+ $ git merge --no-ff --log 1.7.x
182
173
  Merge made by the 'recursive' strategy.
183
174
  foo | 0
184
175
  1 file changed, 0 insertions(+), 0 deletions(-)
185
176
  create mode 100644 foo
186
177
 
187
178
  Once the change set has been merged "in and up." the committer pushes. (Note,
188
- the checklist should be complete at this point.) Note that the stable,
189
- facter-2 and master branches are being pushed at the same time.
179
+ the checklist should be complete at this point.) Note that both the 1.7.x and
180
+ master branches are being pushed at the same time.
190
181
 
191
- $ git push puppetlabs master:master facter-2:facter-2 stable:stable
182
+ $ git push puppetlabs master:master 1.7.x:1.7.x
192
183
 
193
184
  That's it! The committer then updates the pull request, updates the issue in
194
185
  our issue tracker, and keeps an eye on the build status.
data/CONTRIBUTING.md CHANGED
@@ -19,13 +19,13 @@ top of things.
19
19
  ## Making Changes
20
20
 
21
21
  * Create a topic branch from where you want to base your work.
22
- * This is usually the facter-2 branch.
22
+ * This is usually the master branch.
23
23
  * Only target release branches if you are certain your fix must be on that
24
24
  branch.
25
- * To quickly create a topic branch based on facter-2; `git branch
26
- fix/facter-2/my_contribution facter-2` then checkout the new branch with `git
27
- checkout fix/facter-2/my_contribution`. Please avoid working directly on the
28
- `facter-2` branch.
25
+ * To quickly create a topic branch based on master; `git branch
26
+ fix/master/my_contribution master` then checkout the new branch with `git
27
+ checkout fix/master/my_contribution`. Please avoid working directly on the
28
+ `master` branch.
29
29
  * Make commits of logical units.
30
30
  * Check for unnecessary whitespace with `git diff --check` before committing.
31
31
  * Make sure your commit messages are in the proper format.
@@ -47,6 +47,28 @@ top of things.
47
47
  * Make sure you have added the necessary tests for your changes.
48
48
  * Run _all_ the tests to assure nothing else was accidentally broken.
49
49
 
50
+ ## Making Trivial Changes
51
+
52
+ ### Documentation
53
+
54
+ For changes of a trivial nature to comments and documentation, it is not
55
+ always necessary to create a new ticket in Jira. In this case, it is
56
+ appropriate to start the first line of a commit with '(doc)' instead of
57
+ a ticket number.
58
+
59
+ ````
60
+ (doc) Add documentation commit example to CONTRIBUTING
61
+
62
+ There is no example for contributing a documentation commit
63
+ to the Facter repository. This is a problem because the contributor
64
+ is left to assume how a commit of this nature may appear.
65
+
66
+ The first line is a real life imperative statement with '(doc)' in
67
+ place of what would have been the ticket number in a
68
+ non-documentation related commit. The body describes the nature of
69
+ the new documentation or comments added.
70
+ ````
71
+
50
72
  ## Submitting Changes
51
73
 
52
74
  * Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).
data/README.md CHANGED
@@ -7,6 +7,13 @@ like the output of `uname`, public ssh keys, the number of processors, etc.
7
7
 
8
8
  See `bin/facter` for an example of the interface.
9
9
 
10
+ Installation
11
+ ------------
12
+
13
+ Generally, you need the following things installed:
14
+
15
+ * A supported Ruby version. Ruby 1.8.7, 1.9.3, and 2.0.0 (at least p195) are fully supported.
16
+
10
17
  Running Facter
11
18
  --------------
12
19
 
@@ -31,3 +38,28 @@ Further Information
31
38
  -------------------
32
39
 
33
40
  See http://www.puppetlabs.com/puppet/related-projects/facter for more details.
41
+
42
+ Support
43
+ -------
44
+ Please log tickets and issues at our [JIRA tracker](http://tickets.puppetlabs.com). A [mailing
45
+ list](https://groups.google.com/forum/?fromgroups#!forum/puppet-users) is
46
+ available for asking questions and getting help from others. In addition there
47
+ is an active #puppet channel on Freenode.
48
+
49
+ We use semantic version numbers for our releases, and recommend that users stay
50
+ as up-to-date as possible by upgrading to patch releases and minor releases as
51
+ they become available.
52
+
53
+ Bugfixes and ongoing development will occur in minor releases for the current
54
+ major version. Security fixes will be backported to a previous major version on
55
+ a best-effort basis, until the previous major version is no longer maintained.
56
+
57
+
58
+ For example: If a security vulnerability is discovered in Facter 2.1.0, we
59
+ would fix it in the 2 series, most likely as 2.1.1. Maintainers would then make
60
+ a best effort to backport that fix onto the latest Facter 1.7 release.
61
+
62
+ Long-term support, including security patches and bug fixes, is available for
63
+ commercial customers. Please see the following page for more details:
64
+
65
+ [Puppet Enterprise Support Lifecycle](http://puppetlabs.com/misc/puppet-enterprise-lifecycle)
@@ -2,7 +2,7 @@
2
2
  packaging_url: 'git://github.com/puppetlabs/packaging.git --branch=master'
3
3
  packaging_repo: 'packaging'
4
4
  default_cow: 'base-squeeze-i386.cow'
5
- cows: 'base-lucid-i386.cow base-lucid-amd64.cow base-precise-i386.cow base-precise-amd64.cow base-quantal-i386.cow base-quantal-amd64.cow base-saucy-i386.cow base-saucy-amd64.cow base-sid-i386.cow base-sid-amd64.cow base-squeeze-i386.cow base-squeeze-amd64.cow base-stable-i386.cow base-stable-amd64.cow base-testing-i386.cow base-testing-amd64.cow base-trusty-i386.cow base-trusty-amd64.cow base-unstable-i386.cow base-unstable-amd64.cow base-wheezy-i386.cow base-wheezy-amd64.cow'
5
+ cows: 'base-lucid-i386.cow base-lucid-amd64.cow base-precise-i386.cow base-precise-amd64.cow base-squeeze-i386.cow base-squeeze-amd64.cow base-stable-i386.cow base-stable-amd64.cow base-testing-i386.cow base-testing-amd64.cow base-trusty-i386.cow base-trusty-amd64.cow base-wheezy-i386.cow base-wheezy-amd64.cow'
6
6
  pbuild_conf: '/etc/pbuilderrc'
7
7
  packager: 'puppetlabs'
8
8
  gpg_name: 'info@puppetlabs.com'
data/ext/debian/control CHANGED
@@ -7,8 +7,9 @@ Standards-Version: 3.9.1
7
7
  Homepage: http://www.puppetlabs.com
8
8
 
9
9
  Package: facter
10
- Architecture: any
11
- Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, dmidecode [i386 amd64 ia64], virt-what, pciutils
10
+ Architecture: all
11
+ Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter, virt-what, pciutils
12
+ Recommends: lsb-release, dmidecode
12
13
  Description: Ruby module for collecting simple facts about a host operating system
13
14
  Some of the facts are preconfigured, such as the hostname and the operating
14
15
  system. Additional facts can be added through simple Ruby scripts.
@@ -19,6 +19,11 @@ directories:
19
19
  owner: 'root'
20
20
  group: 'wheel'
21
21
  perms: '0644'
22
+ man/man8:
23
+ path: 'usr/share/man/man8'
24
+ owner: 'root'
25
+ group: 'wheel'
26
+ perms: '0755'
22
27
  files:
23
28
  '[A-Z]*':
24
29
  path: 'usr/share/doc/facter'
@@ -32,7 +32,10 @@ Requires: dmidecode
32
32
  Requires: pciutils
33
33
  %endif
34
34
  Requires: virt-what
35
- Requires: ruby >= 1.8.7
35
+ # In Fedora 19+ or RHEL 7+ net-tools is required for interface facts
36
+ %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
37
+ Requires: net-tools
38
+ %endif
36
39
  BuildRequires: ruby >= 1.8.7
37
40
 
38
41
  # In Fedora 17+ or RHEL 7+ ruby-rdoc is called rubygem-rdoc
data/lib/facter/Cfkey.rb CHANGED
@@ -1,9 +1,9 @@
1
- # Fact: Cfkey
1
+ # Fact: cfkey
2
2
  #
3
3
  # Purpose: Return the public key(s) for CFengine.
4
4
  #
5
5
  # Resolution:
6
- # Tries each file of standard localhost.pub & cfkey.pub locations,
6
+ # Tries each file of standard `localhost.pub` and `cfkey.pub` locations,
7
7
  # checks if they appear to be a public key, and then join them all together.
8
8
  #
9
9
  # Caveats:
@@ -4,8 +4,8 @@
4
4
  # Return the CPU hardware architecture.
5
5
  #
6
6
  # Resolution:
7
- # On non-AIX IBM, OpenBSD, Linux and Debian's kfreebsd, use the hardwaremodel fact.
8
- # On AIX get the arch value from lsattr -El proc0 -a type
7
+ # On non-AIX IBM, OpenBSD, Linux, and Debian's kfreebsd, use the hardwaremodel fact.
8
+ # On AIX get the arch value from `lsattr -El proc0 -a type`.
9
9
  # Gentoo and Debian call "x86_86" "amd64".
10
10
  # Gentoo also calls "i386" "x86".
11
11
  #
@@ -1,9 +1,9 @@
1
1
  # Fact: augeasversion
2
2
  #
3
- # Purpose: Report the version of the Augeas library
3
+ # Purpose: Report the version of the Augeas library.
4
4
  #
5
5
  # Resolution:
6
- # Loads ruby-augeas and reports the value of /augeas/version, the version of
6
+ # Loads ruby-augeas and reports the value of `/augeas/version`, the version of
7
7
  # the underlying Augeas library.
8
8
  #
9
9
  # Caveats:
@@ -1,50 +1,50 @@
1
1
  # Fact: blockdevice_<devicename>_size
2
2
  #
3
3
  # Purpose:
4
- # Return the size of a block device in bytes
4
+ # Return the size of a block device in bytes.
5
5
  #
6
6
  # Resolution:
7
- # Parse the contents of /sys/block/<device>/size to receive the size (multiplying by 512 to correct for blocks-to-bytes)
7
+ # Parse the contents of `/sys/block/<device>/size` to receive the size (multiplying by 512 to correct for blocks-to-bytes).
8
8
  #
9
9
  # Caveats:
10
- # Only supports Linux 2.6+ at this time, due to the reliance on sysfs
10
+ # Only supports Linux 2.6+ at this time, due to the reliance on sysfs.
11
11
  #
12
12
 
13
13
  # Fact: blockdevice_<devicename>_vendor
14
14
  #
15
15
  # Purpose:
16
- # Return the vendor name of block devices attached to the system
16
+ # Return the vendor name of block devices attached to the system.
17
17
  #
18
18
  # Resolution:
19
- # Parse the contents of /sys/block/<device>/device/vendor to retrieve the vendor for a device
19
+ # Parse the contents of `/sys/block/<device>/device/vendor` to retrieve the vendor for a device.
20
20
  #
21
21
  # Caveats:
22
- # Only supports Linux 2.6+ at this time, due to the reliance on sysfs
22
+ # Only supports Linux 2.6+ at this time, due to the reliance on sysfs.
23
23
  #
24
24
 
25
25
  # Fact: blockdevice_<devicename>_model
26
26
  #
27
27
  # Purpose:
28
- # Return the model name of block devices attached to the system
28
+ # Return the model name of block devices attached to the system.
29
29
  #
30
30
  # Resolution:
31
- # Parse the contents of /sys/block/<device>/device/model to retrieve the model name/number for a device
31
+ # Parse the contents of `/sys/block/<device>/device/model` to retrieve the model name/number for a device.
32
32
  #
33
33
  # Caveats:
34
- # Only supports Linux 2.6+ at this time, due to the reliance on sysfs
34
+ # Only supports Linux 2.6+ at this time, due to the reliance on sysfs.
35
35
  #
36
36
 
37
37
 
38
38
  # Fact: blockdevices
39
39
  #
40
40
  # Purpose:
41
- # Return a comma seperated list of block devices
41
+ # Return a comma separated list of block devices.
42
42
  #
43
43
  # Resolution:
44
- # Retrieve the block devices that were identified and iterated over in the creation of the blockdevice_ facts
44
+ # Retrieve the block devices that were identified and iterated over in the creation of the blockdevice_ facts.
45
45
  #
46
46
  # Caveats:
47
- # Block devices must have been identified using sysfs information
47
+ # Block devices must have been identified using sysfs information.
48
48
  #
49
49
 
50
50
  # Author: Jason Gill <jasongill@gmail.com>
@@ -2,14 +2,14 @@
2
2
  #
3
3
  # Purpose:
4
4
  # Return the DHCP server addresses for all interfaces as a hash.
5
- # If the interface that is the default gateway is dhcp assigned, there
6
- # will also be a 'system' entry in the hash.
5
+ # If the interface that is the default gateway is DHCP assigned, there
6
+ # will also be a `"system"` entry in the hash.
7
7
  #
8
8
  # Resolution:
9
- # Parses the output of nmcli to find the DHCP server for the interface if available
9
+ # Parses the output of `nmcli` to find the DHCP server for the interface if available.
10
10
  #
11
11
  # Caveats:
12
- # Requires nmcli to be available and the interface must use network-manager.
12
+ # Requires `nmcli` to be available and the interface must use network-manager.
13
13
  #
14
14
 
15
15
  require 'facter'
data/lib/facter/domain.rb CHANGED
@@ -5,12 +5,12 @@
5
5
  #
6
6
  # Resolution:
7
7
  # On UNIX (excluding Darwin), first try and use the hostname fact,
8
- # which uses the hostname system command, and then parse the output
8
+ # which uses the `hostname` system command, and then parse the output
9
9
  # of that.
10
- # Failing that it tries the dnsdomainname system command.
11
- # Failing that it uses /etc/resolv.conf and takes the domain from that, or as
10
+ # Failing that, it tries the `dnsdomainname` system command.
11
+ # Failing that, it uses `/etc/resolv.conf` and takes the domain from that, or as
12
12
  # a final resort, the search from that.
13
- # Otherwise returns nil.
13
+ # Otherwise returns `nil`.
14
14
  #
15
15
  # On Windows uses the win32ole gem and winmgmts to get the DNSDomain value
16
16
  # from the Win32 networking stack.
data/lib/facter/ec2.rb CHANGED
@@ -1,3 +1,20 @@
1
+ # Fact: ec2_<EC2 INSTANCE DATA>
2
+ #
3
+ # Purpose:
4
+ # Returns info retrieved in bulk from the EC2 API. The names of these facts
5
+ # should be self explanatory, and they are otherwise undocumented. The full
6
+ # list of these facts is: ec2_ami_id, ec2_ami_launch_index,
7
+ # ec2_ami_manifest_path, ec2_block_device_mapping_ami,
8
+ # ec2_block_device_mapping_ephemeral0, ec2_block_device_mapping_root,
9
+ # ec2_hostname, ec2_instance_id, ec2_instance_type, ec2_kernel_id,
10
+ # ec2_local_hostname, ec2_local_ipv4, ec2_placement_availability_zone,
11
+ # ec2_profile, ec2_public_hostname, ec2_public_ipv4,
12
+ # ec2_public_keys_0_openssh_key, ec2_reservation_id, and ec2_security_groups.
13
+ #
14
+ # Resolution:
15
+ # Directly queries the EC2 metadata endpoint.
16
+ #
17
+
1
18
  require 'facter/ec2/rest'
2
19
 
3
20
  Facter.define_fact(:ec2_metadata) do
@@ -21,7 +21,7 @@ module Facter
21
21
 
22
22
  begin
23
23
  Timeout.timeout(timeout) do
24
- open(@baseurl).read
24
+ open(@baseurl, :proxy => nil).read
25
25
  end
26
26
  able_to_connect = true
27
27
  rescue OpenURI::HTTPError => e
@@ -78,7 +78,7 @@ module Facter
78
78
  # @return [Array, NilClass]
79
79
  def fetch_endpoint(path)
80
80
  uri = @baseurl + path
81
- body = open(uri).read
81
+ body = open(uri, :proxy => nil).read
82
82
  parse_results(body)
83
83
  rescue OpenURI::HTTPError => e
84
84
  if e.message.match /404 Not Found/i
@@ -1,8 +1,8 @@
1
1
  # Fact: facterversion
2
2
  #
3
- # Purpose: returns the version of the facter module.
3
+ # Purpose: Returns the version of the facter module.
4
4
  #
5
- # Resolution: Uses the Facter.version method.
5
+ # Resolution: Uses the `Facter.version` method.
6
6
  #
7
7
  # Caveats:
8
8
  #