Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'thespain-php_fact', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-php-fact
A custom Puppet fact for reporting the full version of all installed PHP packages.
What this fact returns
This custom fact will return all installed versions of php including multiple
Software Collections version. This is more useful than the typical version
returned by php -v
because this fact also returns the backported patch number.
You can find information about backporting at https://access.redhat.com/security/updates/backporting
Example Facter Output:
This is what it looks like when you have the stock PHP installed along with the 5.5 version that is only available via CentOS or SoftwareCollections.org and versions 5.6 and 7.0 from Red Hat.
"php_packages": {
"php": {
"full_version": "5.4.16-42",
"base_version": "5.4.16",
"major": "5",
"minor": "4",
"revsion": "16",
"backport": "42",
"os": "el7",
"arch": "x86_64",
"package": "php-5.4.16-42.el7.x86_64"
},
"php55": {
"full_version": "5.5.21-5",
"base_version": "5.5.21",
"major": "5",
"minor": "5",
"revsion": "21",
"backport": "5",
"os": "el7",
"arch": "x86_64",
"package": "php55-php-5.5.21-5.el7.x86_64",
"software_collection": "php55"
},
"php56": {
"full_version": "5.6.25-1",
"base_version": "5.6.25",
"major": "5",
"minor": "6",
"revsion": "25",
"backport": "1",
"os": "el7",
"arch": "x86_64",
"package": "rh-php56-php-5.6.25-1.el7.x86_64",
"software_collection": "rh-php56"
},
"php70": {
"full_version": "7.0.10-2",
"base_version": "7.0.10",
"major": "7",
"minor": "0",
"revsion": "10",
"backport": "2",
"os": "el7",
"arch": "x86_64",
"package": "rh-php70-php-7.0.10-2.el7.x86_64",
"software_collection": "rh-php70"
}
}
Limitations
This fact is currently only compatible with the Redhat osfamily.
Not automated testing yet.
Development
Contributing
Pull requests are welcome!
Contributors
Gene Liverman (@genebean) - Refactored for ease of readability and quicker execution time.
BSD 3-Clause License Copyright (c) 2017, thespain All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.