Forge Home

php_fact

This module adds a custom PHP packages fact.

6,874 downloads

6,874 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.0 (latest)
released Aug 24th 2017
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

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'thespain-php_fact', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add thespain-php_fact
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install thespain-php_fact --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

thespain/php_fact — version 0.1.0 Aug 24th 2017

Puppet Forge GitHub tag

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.