apache_vhost_facts

contributions requested
pdk
Facts for listing all running Apache VHosts

6,712 downloads

6,440 latest version

5.0 quality score

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.2.0 (latest)
  • 0.1.1
  • 0.1.0
released Oct 5th 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
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu
    ,
    windows
    ,
    Fedora
    ,
    Darwin
    ,
    SLES
    ,
    Solaris

Start using this module

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

Add this module to your Puppetfile:

mod 'dylanratcliffe-apache_vhost_facts', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add dylanratcliffe-apache_vhost_facts
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install dylanratcliffe-apache_vhost_facts --version 0.2.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

dylanratcliffe/apache_vhost_facts — version 0.2.0 Oct 5th 2017

apache_vhost_facts

This module creates a fact named apache_vhosts which reports vhosts that are currently configured in apache e.g.

apache_vhosts => {
  ssl2.example.com => {
    ip => "10.0.2.15",
    port => "443",
    default => true
  },
  bar.example.com => {
    ip => "*",
    port => "1234",
    default => true
  },
  bot.example.com => {
    ip => "*",
    port => "1234",
    default => false
  },
  default => {
    ip => "*",
    port => "80",
    default => true
  },
  foo.example.com => {
    ip => "*",
    port => "80",
    default => false
  },
  ssl.example.com => {
    ip => "*",
    port => "443",
    default => true
  }
}
}

It works by calling apachectl -S and parsing the output. The default key indicates whether the vhost is the default for that port.