Awesome
resource_api
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with resource_api
- Reference - An under-the-hood peek at what the module is doing and how
- Development - Guide for contributing to the module
Module Description
This module installs the Puppet Resource API gem into a puppet agent and pe-pupetserver or puppetserver service. This is necessary to use any type or provider that is implemented using the Puppet Resource API. Since Puppet 6.0, the Resource API ships with the agent. On these installations, the module automatically does nothing, while still providing the same interface to downstream modules to make switching back and forth seamless.
Setup
What resource_api affects
The Puppet Resource API gem will be installed into a puppet agent using the puppet_gem
provider, and into a puppetserver service using the puppetserver_gem
provider. To activate the gem, a reload of the puppetserver service is necessary. In most cases, this should happen automatically and cause little to no interruption to service.
Setup Requirements
The Puppet Resource API is only compatible with Puppet 4.7 and later. There are no further specific requirements.
Beginning with resource_api
To install dependencies of the Puppet Resource API:
- Classify or apply the
resource_api
class on each server (server of server, and if present, compile servers and replica server) that needs to process Puppet Resource API types and providers. - Classify or apply the
resource_api
class on each puppet agent that needs to apply Puppet Resource API types and providers.
To specify the version of the Puppet Resource API gem you want to install, use the $api_version
parameter with the resource_api::install::server
and resource_api::install::agent
classes instead of using the resource_api
class.
To specify a non-default puppetserver
service resource (if you're not using the standard service) use the $puppetserver_service
parameter with the resource_api::install::server
class instead of using the resource_api
class.
Run puppet agent -t
on the server(s) before using the Puppet Resource API on the agent(s).
Reference
See REFERENCE.md
Development
Execute the Puppet Strings task to generate the latest REFERENCE.md
bundle exec rake 'strings:generate[manifests/**/*.pp,,,,,REFERENCE.md,true]'
Please submit any issues, or contributions on https://github.com/puppetlabs/puppetlabs-resource_api