This code is still under heavy development and subject to change.
CLI that invalidates the PuppetServer environment cache on multiple pre-configured servers simultaneously.
It calls the Puppet Server: Admin API: Environment Cache API endpoint.
Usage:
puppet-environment-cache-invalidate [flags]
Flags:
--config string config file (default is $HOME/.puppet-environment-cache-invalidate.yaml)
--debug enable debug
-h, --help help for puppet-environment-cache-invalidate
--log-json log in JSON format
--log-syslog log to syslog
$ go build .
This project is investigating Github actions to build its packages.
You can find:
- pre-compiled binary for Linux
- pre-built RPM package
in the action tab of this project
Configuration file is searched for in the following places:
/etc/puppet-environment-cache-invalidate.yaml
$HOME/.puppet-environment-cache-invalidate/puppet-environment-cache-invalidate.yaml
This CLI relies on viper so any configuration file format (JSON, TOML, YAML, HCL, envfile and Java properties config files) should be supported.
---
puppetservers:
- 'puppetserver-01.example.org'
- 'puppetserver-02.example.org'
- 'puppetserver-03.example.org'
auth:
certfile: '/etc/puppetlabs/puppet/certs/mynode.pem'
pkfile: '/etc/puppetlabs/puppet/ssl/private_keys/mynode.key'
ca-bundle: '/etc/puppetlabs/puppet/ssl/certs/ca.pem'
- Type:
[]string
- Description: List of puppetservers we should trigger environment cache invalidation for. Required.
- Type:
string
- Description: X509 client certificate file used to authenticate the HTTP request to the puppetserver admin API. Required.
- Type:
string
- Description: Client private key used to authenticate the HTTP request to the puppetserver admin API. Required.
- Type:
string
- Description: CA-Bundle file used to validate the puppetserver certificate. Required.