Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'dodevops-fetchcert', '2.1.0'
Learn more about managing modules with a PuppetfileDocumentation
fetchcert
Fetch a remote certificate and store it locally
Introduction
This module fetches a remote certificate using the openssl s_client function and stores it to a local file.
Dependencies
- puppetlabs-stdlib
- "openssl" command is available locally (can usually be simply installed with the "package"-type)
Usage
With puppet
To download a certificate, simply use the defined type "fetchcert::fetch":
fetchcert::fetch {
'/tmp/mycert.pem':
source_host => 'mysource.example.com'
}
With hiera
This module includes hiera support. Just include the class "fetchcert" and define the hash "fetchcert::fetch"
Parameters
See the documentation.
Reference
Table of Contents
Classes
fetchcert
: Defaults and hiera support for fetchcert
Defined types
fetchcert::fetch
: Fetch a certificate from a remote host and download it to a local file.
Classes
fetchcert
Defaults and hiera support for fetchcert
Parameters
The following parameters are available in the fetchcert
class.
source_port
Data type: Integer
Port, that provides the certificate. Defaults to 443
openssl_command
Data type: String
Command to start openssl
manage_package
Data type: Boolean
package_name
Data type: String
package_ensure
Data type: String
package_provider
Data type: String
Defined types
fetchcert::fetch
Fetch a certificate from a remote host and download it to a local file.
Parameters
The following parameters are available in the fetchcert::fetch
defined type.
source_host
Data type: String
Hostname or IP of the host providing the certificate
target
Data type: Optional[String]
Target file path, defaults to type name
Default value: undef
source_port
Data type: Optional[Integer]
Port, that provides the certificate
Default value: undef
openssl_command
Data type: Optional[String]
Command to start openssl
Default value: undef
package_name
Data type: Optional[String]
Name of the os package, that contains the OpenSSL command
Default value: undef
package_ensure
Data type: Optional[String]
Ensure for the package type
Default value: undef
manage_package
Data type: Optional[Boolean]
Default value: undef
package_provider
Data type: Optional[String]
Default value: undef
MIT License Copyright (c) 2017 DO DevOps! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.