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
- Puppet >= 7.0.0 < 9.0.0
- Archlinux, , , , , , , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-consul', '9.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-consul
This module manages Consul servers and agents.
- Compatibility
- Usage
- Web UI
- Service Definition
- Watch Definitions
- Check Definitions
- Removing Service, Check and Watch definitions
- ACL Definitions
- Prepared Queries and Prepared Query Templates
- Key/Value Objects
- Limitations
- Windows Experimental Support
- Telemetry
- Consul Template
- Development
Compatibility
WARNING: Backwards incompatible changes happen in order to more easily support new versions of consul. Pin to the version that works for your setup!
Consul Version | Recommended Puppet Module Version |
---|---|
>= 1.11.x | >= 6.0.0 |
1.1.0-1.10.x | 4.0.0-7.0.x |
0.9-1.1.0 | <= 3.4.2 |
0.8.x | <= 3.2.4 |
0.7.0 | <= 2.1.1 |
0.6.0 | <= 2.1.1 |
0.5.x | 1.0.3 |
0.4.x | 0.4.6 |
What This Module Affects
- Installs the consul daemon (via url or package)
- If installing from zip, you must ensure the unzip utility is available.
- If installing from docker, you must ensure puppetlabs-docker_platform module is available.
- If installing on windows, you must install the
puppetlabs/powershell
module.
- Optionally installs a user to run it under
- NOTE: users enabling this and just starting with Consul should consider setting
manage_user_home_location
totrue
. It defaults to false for backwards compatibility.
- NOTE: users enabling this and just starting with Consul should consider setting
- Installs a configuration file (/etc/consul/config.json)
- Manages the consul service via upstart, sysv, systemd, or nssm.
- Optionally installs the Web UI
Usage
To set up a single consul server, with several agents attached: On the server:
class { 'consul':
config_hash => {
'bootstrap_expect' => 1,
'data_dir' => '/opt/consul',
'datacenter' => 'east-aws',
'log_level' => 'INFO',
'node_name' => 'server',
'server' => true,
},
}
On the agent(s):
class { 'consul':
config_hash => {
'data_dir' => '/opt/consul',
'datacenter' => 'east-aws',
'log_level' => 'INFO',
'node_name' => 'agent',
'retry_join' => ['172.16.0.1'],
},
}
Disable install and service components:
class { 'consul':
install_method => 'none',
init_style => false,
manage_service => false,
config_hash => {
'data_dir' => '/opt/consul',
'datacenter' => 'east-aws',
'log_level' => 'INFO',
'node_name' => 'agent',
'retry_join' => ['172.16.0.1'],
},
}
Install the (HashiCorp) packages:
class { 'consul':
install_method => 'package',
manage_repo => $facts['os']['name'] != 'Archlinux',
init_style => 'unmanaged',
manage_data_dir => true,
manage_group => false,
manage_user => false,
config_dir => '/etc/consul.d/',
config_hash => {
'server' => true,
},
}
systemd::dropin_file { 'foo.conf':
unit => 'consul.service',
content => "[Unit]\nConditionFileNotEmpty=\nConditionFileNotEmpty=/etc/consul.d/config.json",
notify_service => true,
}
Web UI
To install and run the Web UI on the server, include ui => true
in the
config_hash
. You may also want to change the client_addr
to 0.0.0.0
from
the default 127.0.0.1
, for example:
class { 'consul':
config_hash => {
'bootstrap_expect' => 1,
'client_addr' => '0.0.0.0',
'data_dir' => '/opt/consul',
'datacenter' => 'east-aws',
'log_level' => 'INFO',
'node_name' => 'server',
'server' => true,
'ui' => true,
},
}
For more security options, consider leaving the client_addr
set to 127.0.0.1
and use with a reverse proxy:
$aliases = ['consul', 'consul.example.com']
# Reverse proxy for Web interface
include 'nginx'
$server_names = [$facts['networking']['fqdn'], $aliases]
nginx::resource::vhost { $facts['networking']['fqdn']:
proxy => 'http://localhost:8500',
server_name => $server_names,
}
Service Definition
To declare the availability of a service, you can use the service
define. This
will register the service through the local consul client agent and optionally
configure a health check to monitor its availability.
consul::service { 'redis':
checks => [
{
args => ['/usr/local/bin/check_redis.py'],
interval => '10s'
},
],
port => 6379,
tags => ['master'],
meta => {
SLA => '1'
},
}
See the service.pp docstrings for all available inputs.
You can also use consul::services
which accepts a hash of services, and makes
it easy to declare in hiera. For example:
consul::services:
service1:
address: "%{facts.networking.ip}"
checks:
- http: http://localhost:42/status
interval: 5s
port: 42
tags:
- "foo:%{facts.custom.bar}"
meta:
SLA: 1
service2:
address: "%{facts.networking.ip}"
checks:
- http: http://localhost:43/status
interval: 5s
port: 43
tags:
- "foo:%{facts.custom.baz}"
meta:
SLA: 4
Watch Definitions
consul::watch { 'my_watch':
handler => 'handler_path',
passingonly => true,
service => 'serviceName',
service_tag => 'serviceTagName',
type => 'service',
}
See the watch.pp docstrings for all available inputs.
You can also use consul::watches
which accepts a hash of watches, and makes
it easy to declare in hiera.
Check Definitions
consul::check { 'true_check':
interval => '30s',
args => ['/bin/true'],
}
See the check.pp docstrings for all available inputs.
You can also use consul::checks
which accepts a hash of checks, and makes
it easy to declare in hiera.
Removing Service, Check and Watch definitions
Do ensure => absent
while removing existing service, check and watch
definitions. This ensures consul will be reloaded via SIGHUP
. If you have
purge_config_dir
set to true
and simply remove the definition it will cause
consul to restart.
ACL Definitions
Policy/Token system
Starting with version 1.4.0, a new ACL system was introduces separating rules (policies) from tokens.
Tokens and policies may be both managed by Puppet:
consul_policy {'test_policy':
description => 'test description',
rules => [
{
'resource' => 'service_prefix',
'segment' => 'test_service',
'disposition' => 'read'
},
{
'resource' => 'key',
'segment' => 'test_key',
'disposition' => 'write'
},
],
acl_api_token => 'e33653a6-0320-4a71-b3af-75f14578e3aa',
}
consul_token {'test_token':
accessor_id => '7c4e3f11-786d-44e6-ac1d-b99546a1ccbd',
policies_by_name => [
'test_policy'
],
policies_by_id => [
'652f27c9-d08d-412b-8985-9becc9c42fb2'
],
}
Here is an example to automatically create a policy and token for each host.
For development environments acl_api_token
can be the bootstrap token. For production it should be a dedicated token with access to write/read from the acls.
accessor_id
must be provided. It is a uuid. It can be generated in several different ways.
- Statically generated and assigned to the resource. See
/usr/bin/uuidgen
on unix systems. - Dynamically derived from the
$facts['dmi']['product']['uuid']
fact in puppet (useful whenconsul_token
has 1:1 mapping to hosts). - Dynamically derived from arbitrary string using
fqdn_uuid()
(useful for giving all instances of a resource unique id).
# Create ACL policy that allows nodes to update themselves and read others
consul_policy { $facts['networking']['hostname']:
description => "${facts['networking']['hostname']}, generated by puppet",
rules => [
{
'resource' => 'node',
'segment' => "$facts['networking']['hostname']",
'disposition' => 'write'
},
{
'resource' => 'node',
'segment' => '',
'disposition' => 'read'
}
],
acl_api_token => $acl_api_token,
}
consul_token { $facts['networking']['hostname']:
accessor_id => fqdn_uuid($facts['networking']['hostname']),
policies_by_name => ["${facts['networking']['hostname']}"],
acl_api_token => $acl_api_token,
}
Predefining token secret is supported by setting secret_id property.
Externally created tokens and policies may be used by referencing them by ID (Token: accessor_id property, Policy: ID property, linking: policies_by_id property)
Legacy system
consul_acl { 'ctoken':
ensure => 'present',
rules => {
'key' => {
'test' => {
'policy' => 'read'
},
},
},
type => 'client',
}
Do not use duplicate names, and remember that the ACL ID (a read-only property for this type) is used as the token for requests, not the name
Optionally, you may supply an acl_api_token
. This will allow you to create
ACLs if the anonymous token doesn't permit ACL changes (which is likely).
The api token may be the master token, another management token, or any
client token with sufficient privileges.
NOTE: This module currently cannot parse ACL tokens generated through means other than this module. Don't mix Puppet and Non-puppet ACLs for best results! (pull requests welcome to allow it to co-exist with ACLs generated with normal HCL)
Prepared Queries and Prepared Query Templates
consul_prepared_query { 'consul':
ensure => 'present',
service_name => 'consul',
service_failover_n => 1,
service_failover_dcs => [ 'dc1', 'dc2' ],
service_only_passing => true,
service_tags => [ 'tag1', 'tag2' ],
service_meta => { 'version' => '1.2.3' },
ttl => 10,
}
or a prepared query template:
consul_prepared_query { 'consul':
ensure => 'present',
service_name => 'consul',
service_name => 'consul-${match(1)}' # lint:ignore:single_quote_string_with_variables
service_failover_n => 1,
service_failover_dcs => [ 'dc1', 'dc2' ],
service_only_passing => true,
service_tags => [ '${match(2)}' ], # lint:ignore:single_quote_string_with_variables
node_meta => { 'is_virtual' => 'false' },
template => true,
template_regexp => '^consul-(.*)-(.*)$',
template_type => 'name_prefix_match',
}
Key/Value Objects
Example:
consul_key_value { 'key/path':
ensure => 'present',
value => 'myvaluestring',
flags => 12345,
datacenter => 'dc1',
}
This provider allows you to manage key/value pairs. It tries to be smart in two ways:
- It caches the data accessible from the kv store with the specified acl token.
- It does not update the key if the value & flag are already correct.
These parameters are mandatory when using consul_key_value
:
name
Name of the key/value object. Path in key/value store.value
value of the key.
The optional parameters only need to be specified if you require changes from default behaviour.
flags
{Integer} an opaque unsigned integer that can be attached to each entry. Clients can choose to use this however makes sense for their application. Default is0
.acl\_api_token
{String} Token for accessing the ACL API. Default is''
.datacenter
{String} Use the key/value store in specified datacenter. If''
(default) it will use the datacenter of the Consul agent at the HTTP address.protocol
{String} protocol to use. Either'http'
(default) or'https'
.port
{Integer} consul port. Defaults to8500
.hostname
{String} consul hostname. Defaults to'localhost'
.api_tries
{Integer} number of tries when contacting the Consul REST API. Timeouts are not retried because a timeout already takes long. Defaults to3
.
Limitations
Depends on the JSON gem, or a modern ruby. (Ruby 1.8.7 is not officially supported) Current versions of puppetserver are new enough (2.0.3 & greater are known to work).
Windows Experimental Support
Windows service does no longer need [NSSM] to host the service. Consul will be installed as a native windows service using build-in sc.exe. The following caveats apply:
- By defult eveything will be installed into
c:\ProgramData\Consul\
and$consul::config_hash['data_dir']
will default point to that location, so you don't need that in yourconfig_hash
- The service user needs
logon as a service
permission to run things as a service(not yet supported by this module). therefore willconsul::manage_user
andconsul::manage_group
be defaultfalse
. - consul::user will default be
NT AUTHORITY\NETWORK SERVICE
(Has by defaultlogon as a service
permission). - consul::group will default be
Administrators
Example:
class { 'consul':
config_hash => {
'bootstrap_expect' => 1,
'datacenter' => 'dc1',
'log_level' => 'INFO',
'node_name' => 'server',
'server' => true,
},
}
Telemetry
The Consul agent collects various runtime metrics about the performance of different libraries and subsystems. These metrics are aggregated on a ten second interval and are retained for one minute.
To view this data, you must send a signal to the Consul process: on Unix, this is USR1 while on Windows it is BREAK. Once Consul receives the signal, it will dump the current telemetry information to the agent's stderr.
This telemetry information can be used for debugging or otherwise getting a better view of what Consul is doing.
Example:
class { 'consul':
config_hash => {
'bootstrap_expect' => 1,
'data_dir' => '/opt/consul',
'datacenter' => 'east-aws',
'log_level' => 'INFO',
'node_name' => 'server',
'server' => true,
'telemetry' => {
'statsd_address' => 'localhost:9125',
'prefix_filter' => [
'+consul.client.rpc',
'+consul.client.rpc.exceeded',
'+consul.acl.cache_hit',
'+consul.acl.cache_miss',
'+consul.dns.stale_queries',
'+consul.raft.state.leader',
'+consul.raft.state.candidate',
'+consul.raft.apply',
'+consul.raft.commitTime',
'+consul.raft.leader.dispatchLog',
'+consul.raft.replication.appendEntries',
'+consul.raft.leader.lastContact',
'+consul.rpc.accept_conn',
'+consul.catalog.register',
'+consul.catalog.deregister',
'+consul.kvs.apply',
'+consul.leader.barrier',
'+consul.leader.reconcile',
'+consul.leader.reconcileMember',
'+consul.leader.reapTombstones',
'+consul.rpc.raft_handoff',
'+consul.rpc.request_error',
'+consul.rpc.request',
'+consul.rpc.query',
'+consul.rpc.consistentRead',
'+consul.memberlist.msg.suspect',
'+consul.serf.member.flap',
'+consul.serf.events',
'+consul.session_ttl.active',
],
},
},
}
The metrics for the consul system you can look them in the Official Consul Site with all the description for every metric. Url: https://www.consul.io/docs/agent/telemetry.html
Consul Template
Consul Template is a piece of software to dynamically write out config files using templates that are populated with values from Consul. This module does not configure consul template. See gdhbashton/consul_template for a module that can do that.
Development
Open an issue or fork and open a Pull Request
Transfer Notice
This module was originally authored by solarkennedy. The maintainer preferred that Vox Pupuli take ownership of the module for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of KyleAnderson.
Previously: https://github.com/solarkennedy/puppet-consul
Reference
Table of Contents
Classes
Public Classes
consul
: Installs, configures and manages consul
Private Classes
consul::config
: This class is called from consul::init to install the config file.consul::install
: Installs consul based on the parameters from initconsul::params
: == Class consul::params This class is meant to be called from consul It sets variables according to platformconsul::reload_service
: This class is meant to be called from certain configuration changes that support reload.consul::run_service
: This class is meant to be called from consul. It ensures the service is runningconsul::windows_service
: Installs consul windows server
Defined types
consul::check
: Sets up a Consul healthcheckconsul::service
: Sets up a Consul service definitionconsul::watch
: Sets up Consul watch, to span commands when data changes.
Resource types
consul_acl
: Manage a consul token and its ACLs.consul_key_value
: Manage a consul key value object.consul_policy
: Manages a Consul ACL policyconsul_prepared_query
: Manage a consul prepared query.consul_token
: Manages a v2 Consul token
Functions
Data types
Classes
consul
Installs, configures and manages consul
Examples
simple consul setup
class { 'consul':
config_hash => {
'datacenter' => 'east-aws',
'node_name' => $facts['fqdn'],
'pretty_config => true,
'retry-join' => ['172.16.0.1'],
},
}
Parameters
The following parameters are available in the consul
class:
acls
tokens
policies
acl_api_hostname
acl_api_protocol
acl_api_port
acl_api_tries
acl_api_token
arch
archive_path
bin_dir
binary_group
binary_mode
binary_name
binary_owner
checks
config_defaults
config_dir
config_name
config_hash
config_mode
config_owner
data_dir_mode
docker_image
download_extension
download_url
download_url_base
extra_groups
extra_options
group
init_style
install_method
join_wan
manage_group
manage_repo
manage_service
manage_user
manage_user_home_location
manage_data_dir
os
package_ensure
package_name
pretty_config
pretty_config_indent
proxy_server
purge_config_dir
restart_on_change
service_enable
service_ensure
services
user
version
watches
shell
enable_beta_ui
allow_binding_to_root_ports
log_file
comment
uid
gid
acls
Data type: Hash
Hash of consul_acl resources to create.
Default value: {}
tokens
Data type: Hash[String[1], Consul::TokenStruct]
Hash of consul_token resources to create.
Default value: {}
policies
Data type: Hash[String[1], Consul::PolicyStruct]
Hash of consul_policy resources to create.
Default value: {}
acl_api_hostname
Data type: String[1]
Global hostname of ACL API, will be merged with consul_token resources
Default value: 'localhost'
acl_api_protocol
Data type: String[1]
Global protocl of ACL API, will be merged with consul_token resources
Default value: 'http'
acl_api_port
Data type: Integer[1, 65535]
Global port of ACL API, will be merged with consul_token resources
Default value: 8500
acl_api_tries
Data type: Integer[1]
Global max. tries of ACL API, will be merged with consul_token resources
Default value: 3
acl_api_token
Data type: String[0]
Global token of ACL API, will be merged with consul_token resources
Default value: ''
arch
Data type: String[1]
Architecture of consul binary to download
Default value: $consul::params::arch
archive_path
Data type: Optional[Stdlib::Absolutepath]
Path used when installing consul via the url
Default value: undef
bin_dir
Data type: Stdlib::Absolutepath
Directory to create the symlink to the consul binary in.
Default value: $consul::params::bin_dir
binary_group
Data type: Optional[String[1]]
The group that the file belongs to.
Default value: $consul::params::binary_group
binary_mode
Data type: String[1]
Permissions mode for the file.
Default value: $consul::params::binary_mode
binary_name
Data type: String[1]
The binary name file.
Default value: $consul::params::binary_name
binary_owner
Data type: String[1]
The user that owns the file.
Default value: $consul::params::binary_owner
checks
Data type: Hash
Hash of consul::check resources to create.
Default value: {}
config_defaults
Data type: Hash
Configuration defaults hash. Gets merged with config_hash.
Default value: $consul::params::config_defaults
config_dir
Data type: Stdlib::Absolutepath
Directory to place consul configuration files in.
Default value: $consul::params::config_dir
config_name
Data type: String[1]
Name of the consul configuration file.
Default value: 'config.json'
config_hash
Data type: Variant[Hash,Sensitive[Hash]]
Use this to populate the JSON config file for consul.
Default value: {}
config_mode
Data type: String[1]
Use this to set the JSON config file mode for consul.
Default value: '0664'
config_owner
Data type: Optional[String[1]]
The user that owns the config_dir directory and its files.
Default value: undef
data_dir_mode
Data type: String[1]
Use this to set the data_dir directory mode for consul.
Default value: $consul::params::data_dir_mode
docker_image
Data type: String[1]
Only valid when the install_method == docker. Defaults to consul
.
Default value: 'consul'
download_extension
Data type: String[1]
The extension of the archive file containing the consul binary to download.
Default value: 'zip'
download_url
Data type: Optional[Stdlib::Filesource]
Fully qualified url, puppet uri or absolute path to the location of the archive file containing the consul binary.
Default value: undef
download_url_base
Data type: String[1]
Base url to the location of the archive file containing the consul binary.
Default value: 'https://releases.hashicorp.com/consul/'
extra_groups
Data type: Array
Extra groups to add the consul system user to.
Default value: []
extra_options
Data type: Optional[String[1]]
Extra arguments to be passed to the consul agent
Default value: undef
group
Data type: String[1]
Name of the group that should own the consul configuration files.
Default value: $consul::params::group
init_style
Data type: String[1]
What style of init system your system uses. Set to 'unmanaged' to disable managing init system files for the consul service entirely. This is ignored when install_method == 'docker'
Default value: $consul::params::init_style
install_method
Data type: String[1]
Valid strings: docker
- install via docker container
package
- install via system package
url
- download and extract from a url. Defaults to url
.
none
- disable install.
Default value: 'url'
join_wan
Data type: Optional[String[1]]
The wan to join on service start (e.g. 'wan.foo.com'). Defaults to undef (i.e. won't join a wan).
Default value: undef
manage_group
Data type: Boolean
Whether to create/manage the group that should own the consul configuration files.
Default value: $consul::params::manage_group
manage_repo
Data type: Boolean
Configure the upstream HashiCorp repository. Only relevant when $consul::install_method = 'package'.
Default value: false
manage_service
Data type: Boolean
Whether to manage the consul service.
Default value: true
manage_user
Data type: Boolean
Whether to create/manage the user that should own consul's configuration files.
Default value: $consul::params::manage_user
manage_user_home_location
Data type: Boolean
Whether to explicitly set the location of the consul user's home directory when this modules
manages the creation of the user (aka manage_user = true
). If the consul user already exists
and this is enabled, puppet tries to change the consul user's home to the new location. This
will cause the puppet run to fail if the consul service is currently running.
Default value: false
manage_data_dir
Data type: Boolean
Whether to manage the consul storage data directory.
Default value: true
os
Data type: String[1]
OS component in the name of the archive file containing the consul binary.
Default value: $facts['kernel'].downcase
package_ensure
Data type: String[1]
Only valid when the install_method == package. Defaults to latest
.
Default value: 'latest'
package_name
Data type: String[1]
Only valid when the install_method == package. Defaults to consul
.
Default value: 'consul'
pretty_config
Data type: Boolean
Generates a human readable JSON config file. Defaults to false
.
Default value: false
pretty_config_indent
Data type: Integer
Toggle indentation for human readable JSON file. Defaults to 4
.
Default value: 4
proxy_server
Data type: Optional[Stdlib::HTTPUrl]
Specify a proxy server, with port number if needed. ie: https://example.com:8080.
Default value: undef
purge_config_dir
Data type: Boolean
Purge config files no longer generated by Puppet
Default value: true
restart_on_change
Data type: Boolean
Determines whether to restart consul agent on $config_hash changes. This will not affect reloads when service, check or watch configs change.
Default value: true
service_enable
Data type: Boolean
Whether to enable the consul service to start at boot.
Default value: true
service_ensure
Data type: Enum['stopped', 'running']
Whether the consul service should be running or not.
Default value: 'running'
services
Data type: Hash
Hash of consul::service resources to create.
Default value: {}
user
Data type: String[1]
Name of the user that should own the consul configuration files.
Default value: $consul::params::user
version
Data type: String[1]
Specify version of consul binary to download.
Default value: '1.20.0'
watches
Data type: Hash
Hash of consul::watch resources to create.
Default value: {}
shell
Data type: Optional[String[1]]
The shell for the consul user. Defaults to something that prohibits login, like /usr/sbin/nologin
Default value: $consul::params::shell
enable_beta_ui
Data type: Boolean
consul 1.1.0 introduced a new UI, which is currently (2018-05-12) in beta status. You can enable it by setting this variable to true. Defaults to false
Default value: false
allow_binding_to_root_ports
Data type: Boolean
enables CAP_NET_BIND_SERVICE if true. This is currently only implemented on systemd nodes
Default value: false
log_file
Data type: Stdlib::Absolutepath
where should the log file be located
Default value: '/var/log/consul'
comment
Data type: Optional[String[1]]
the comment for the consul user, will be added to /etc/passwd
Default value: undef
uid
Data type: Optional[Integer[1]]
the ID for the consul user
Default value: undef
gid
Data type: Optional[Integer[1]]
the ID for the consul group
Default value: undef
Defined types
consul::check
Sets up a Consul healthcheck
Parameters
The following parameters are available in the consul::check
defined type:
ensure
http
id
interval
notes
script
args
service_id
status
tcp
grpc
timeout
token
ttl
success_before_passing
failures_before_critical
ensure
Data type: Enum['absent', 'present']
Define availability of check. Use 'absent' to remove existing checks
Default value: present
http
Data type: Optional
HTTP endpoint for the service healthcheck
Default value: undef
id
Data type: String[1]
The id for the check (defaults to $title)
Default value: $title
interval
Data type: Optional
Value in seconds for the interval between runs of the check
Default value: undef
notes
Data type: Optional
Human readable description of the check
Default value: undef
script
Data type: Optional
Full path to the location of the healthcheck script. Must be nagios compliant with regards to the return codes. This parameter is deprecated in Consul 1.0.0, see https://github.com/hashicorp/consul/issues/3509.
Default value: undef
args
Data type: Optional
Arguments to be exec
ed for the healthcheck script.
Default value: undef
service_id
Data type: Optional
An optional service_id to match this check against
Default value: undef
status
Data type: Optional
The default state of the check when it is registered against a consul agent. Should be either "critical" or "passing"
Default value: undef
tcp
Data type: Optional
The IP/hostname and port for the service healthcheck. Should be in 'hostname:port' format.
Default value: undef
grpc
Data type: Optional
GRPC endpoint for the service healthcheck
Default value: undef
timeout
Data type: Optional
A timeout value for HTTP request only
Default value: undef
token
Data type: Optional
ACL token for interacting with the catalog (must be 'management' type)
Default value: undef
ttl
Data type: Optional
Value in seconds before the http endpoint considers a failing healthcheck to be "HARD" down.
Default value: undef
success_before_passing
Data type: Optional
Value may be set to become check passing only after a specified number of consecutive checks return passing
Default value: undef
failures_before_critical
Data type: Optional
Value may be set to become check critical only after a specified number of consecutive checks return critical
Default value: undef
consul::service
Sets up a Consul service definition
Examples
simple MySQL service
consul::service { 'my_db':
port => 3306,
tags => ['db','mysql'],
address => '1.2.3.4',
token => 'xxxxxxxxxx',
service_config_hash => {
'connect' => {
'sidecar_service' => {},
},
},
checks => [
{
name => 'MySQL Port',
tcp => 'localhost:3306',
interval => '10s',
},
],
}
simple HTTPS service
consul::service { 'my_https_app':
port => 443,
tags => ['web','rails'],
address => '1.2.3.5',
token => 'xxxxxxxxxx',
service_config_hash => {
'connect' => {
'sidecar_service' => {},
},
},
checks => [
{
name => 'HTTPS Request',
http => 'https://localhost:443',
tls_skip_verify => true,
method => "GET",
headers => { "Host" => ["test.example.com"] },
},
],
}
Parameters
The following parameters are available in the consul::service
defined type:
address
Data type: Optional[String[1]]
IP address the service is running at.
Default value: undef
checks
Data type: Array[Hash]
If provided an array of checks that will be added to this service
Default value: []
enable_tag_override
Data type: Boolean
enable_tag_override support for service. Defaults to False.
Default value: false
ensure
Data type: String[1]
Define availability of service. Use 'absent' to remove existing services. Defaults to 'present'
Default value: 'present'
id
Data type: String[1]
The unique ID of the service on the node. Defaults to title.
Default value: $title
port
Data type: Optional[Integer[0, 65535]]
TCP port the service runs on.
Default value: undef
service_name
Data type: String[1]
Name of the service. Defaults to title.
Default value: $title
service_config_hash
Data type: Hash
Use this to populate the basic service params for each of the services
Default value: {}
tags
Data type: Array[String[1]]
Array of strings.
Default value: []
token
Data type: Optional[String[1]]
ACL token for interacting with the catalog (must be 'management' type)
Default value: undef
meta
Data type:
Optional[Hash[
String[1],
Variant[
String[1],
Numeric,
Boolean,
]]]
Service meta key/value pairs as hash.
Default value: undef
consul::watch
Sets up Consul watch, to span commands when data changes.
- See also
Parameters
The following parameters are available in the consul::watch
defined type:
datacenter
ensure
event_name
handler
args
key
keyprefix
passingonly
service
service_tag
state
token
type
datacenter
Data type: Optional
String overriding consul's default datacenter.
Default value: undef
ensure
Data type: Enum['present', 'absent']
Define availability of watch. Use 'absent' to remove existing watches.
Default value: present
event_name
Data type: Optional
Name of an event to watch for.
Default value: undef
handler
Data type: Optional
Full path to the script that will be excuted. This parameter is deprecated in Consul 1.0.0
Default value: undef
args
Data type: Optional
Arguments to be exec
ed for the watch.
Default value: undef
key
Data type: Optional
Watch a specific key.
Default value: undef
keyprefix
Data type: Optional
Watch a whole keyprefix
Default value: undef
passingonly
Data type: Optional[Boolean]
Watch only those services that are passing healthchecks.
Default value: undef
service
Data type: Optional
Watch a particular service
Default value: undef
service_tag
Data type: Optional
This actually maps to the "tag" param for service watches. (tag
is a puppet builtin metaparameter)
Default value: undef
state
Data type: Optional
Watch a state change on a service healthcheck.
Default value: undef
token
Data type: Optional
String to override the default token.
Default value: undef
type
Data type: Optional
Type of data to watch. (Like key, service, services, nodes)
Default value: undef
Resource types
consul_acl
Manage a consul token and its ACLs.
Properties
The following properties are available in the consul_acl
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
id
ID of token
protocol
Valid values: http
, https
consul protocol
Default value: http
rules
hash of ACL rules for this token
type
Valid values: client
, management
Type of token
Default value: client
Parameters
The following parameters are available in the consul_acl
type.
acl_api_token
Token for accessing the ACL API
Default value: anonymous
api_tries
number of tries when contacting the Consul REST API
Default value: 3
hostname
consul hostname
Default value: localhost
name
namevar
Name of the token
port
consul port
Default value: 8500
provider
The specific backend to use for this consul_acl
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
consul_key_value
Manage a consul key value object.
Properties
The following properties are available in the consul_key_value
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
value
The key value string
Parameters
The following parameters are available in the consul_key_value
type.
acl_api_token
Token for accessing the ACL API
Default value: anonymous
api_tries
number of tries when contacting the Consul REST API
Default value: 3
datacenter
Name of the datacenter to query. If unspecified, the query will default to the datacenter of the Consul agent at the HTTP address.
Default value: ''
flags
Flags integer
Default value: 0
hostname
consul hostname
Default value: localhost
name
namevar
Name of the key/value object
port
consul port
Default value: 8500
protocol
Valid values: http
, https
consul protocol
Default value: http
provider
The specific backend to use for this consul_key_value
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
consul_policy
Manages a Consul ACL policy
Properties
The following properties are available in the consul_policy
type.
datacenters
List of datacenter names assigned to the policy
Default value: []
description
Description of the policy
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
id
ID of already existing policy
Default value: ''
rules
List of ACL rules for this policy
Default value: []
Parameters
The following parameters are available in the consul_policy
type.
acl_api_token
Token for accessing the ACL API
Default value: ''
api_tries
number of tries when contacting the Consul REST API
Default value: 3
hostname
consul hostname
Default value: localhost
name
namevar
Name of the policy
port
consul port
Default value: 8500
protocol
Valid values: http
, https
consul protocol
Default value: http
provider
The specific backend to use for this consul_policy
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
consul_prepared_query
Manage a consul prepared query.
Properties
The following properties are available in the consul_prepared_query
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
id
ID of prepared query
Parameters
The following parameters are available in the consul_prepared_query
type.
acl_api_token
api_tries
hostname
name
node_meta
port
protocol
provider
service_failover_dcs
service_failover_n
service_meta
service_name
service_near
service_only_passing
service_tags
template
template_regexp
template_type
token
ttl
acl_api_token
Token for accessing the ACL API
Default value: anonymous
api_tries
number of tries when contacting the Consul REST API
Default value: 3
hostname
consul hostname
Default value: localhost
name
namevar
Name of the prepared query
node_meta
List of user-defined key/value pairs to filter on NodeMeta
port
consul port
Default value: 8500
protocol
Valid values: http
, https
consul protocol
Default value: http
provider
The specific backend to use for this consul_prepared_query
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
service_failover_dcs
List of datacenters to forward queries to if no health services found locally
Default value: []
service_failover_n
Failover to the nearest datacenters
Default value: 0
service_meta
List of user-defined key/value pairs to filter on ServiceMeta
service_name
Service name for the prepared query
service_near
Resurn results in ascending order of estimated RTT from given node name, or _agent special value
Default value: ''
service_only_passing
Only return services in the passing state
Default value: false
service_tags
List of tags to filter the query with
Default value: []
template
Valid values: true
, false
, yes
, no
is template?
Default value: false
template_regexp
regexp for template
Default value: ''
template_type
type for template
Default value: name_prefix_match
token
The prepared query token
Default value: ''
ttl
TTL for the DNS lookup
Default value: 0
consul_token
Manages a v2 Consul token
Properties
The following properties are available in the consul_token
type.
accessor_id
Accessor ID of the token
description
Description of the token
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
policies_by_id
List of policy IDs assigned to the token
Default value: []
policies_by_name
List of policy names assigned to the token
Default value: []
secret_id
Secret ID of the token
Default value: ''
Parameters
The following parameters are available in the consul_token
type.
acl_api_token
Token for accessing the ACL API
Default value: ''
api_tries
number of tries when contacting the Consul REST API
Default value: 3
hostname
consul hostname
Default value: localhost
name
namevar
Name of the token
port
consul port
Default value: 8500
protocol
Valid values: http
, https
consul protocol
Default value: http
provider
The specific backend to use for this consul_token
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
Functions
consul::sorted_json
Type: Ruby 4.x API
The consul::sorted_json function.
consul::sorted_json(Optional[Any] $unsorted_hash = {}, Optional[Any] $pretty = false, Optional[Any] $indent_len = 4)
The consul::sorted_json function.
Returns: Any
unsorted_hash
Data type: Optional[Any]
pretty
Data type: Optional[Any]
indent_len
Data type: Optional[Any]
consul::validate_checks
Type: Ruby 4.x API
The consul::validate_checks function.
consul::validate_checks(HashOrArray $obj)
The consul::validate_checks function.
Returns: Any
obj
Data type: HashOrArray
Data types
Consul::PolicyStruct
The Consul::PolicyStruct data type.
Alias of
Struct[{
id => Optional[String[1]],
ensure => Optional[Enum['present', 'absent']],
description => Optional[String[0]],
datacenters => Optional[Array[String[1]]],
rules => Optional[Array[Struct[{
resource => String[1],
segment => Optional[String[0]],
disposition => String[1],
}]]],
acl_api_token => Optional[String[1]],
protocol => Optional[String[1]],
port => Optional[Integer[1, 65535]],
hostname => Optional[String[1]],
api_tries => Optional[Integer[1]],
}]
Consul::TokenStruct
The Consul::TokenStruct data type.
Alias of
Struct[{
description => Optional[String[0]],
accessor_id => String[1],
ensure => Optional[Enum['present', 'absent']],
secret_id => Optional[String[1]],
policies_by_name => Optional[Array[String]],
policies_by_id => Optional[Array[String]],
acl_api_token => Optional[String[1]],
protocol => Optional[String[1]],
port => Optional[Integer[1, 65535]],
hostname => Optional[String[1]],
api_tries => Optional[Integer[1]],
}]
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v9.0.0 (2024-10-30)
Breaking changes:
- Drop EoL RedHat 7 support #673 (bastelfreak)
- Drop EoL Debian 10 support #671 (bastelfreak)
- Drop EoL Scientific linux support #670 (bastelfreak)
- Drop EoL Ubuntu 18.04 support #665 (bastelfreak)
- Drop EoL CentOS 7/8 & OracleLinux 7 #664 (bastelfreak)
Implemented enhancements:
- Update default version from 1.16.3->1.20.0 #681 (bastelfreak)
- Add missing datatypes to all parameters #679 (bastelfreak)
- consul::windows_service: Add datatypes #678 (bastelfreak)
- Add support for managing group ID #677 (bastelfreak)
- Add support for managing user ID and comment #676 (bastelfreak)
- manage_repo: Move value from params.pp->init.pp #675 (bastelfreak)
- Add Ubuntu 24.04 support #674 (bastelfreak)
Merged pull requests:
- update puppet-systemd upper bound to 8.0.0 #661 (TheMeier)
init.pp
: Fixmanage_repo
param docstring, replace nomad with consul #658 (lbdemv)
v8.1.0 (2024-03-08)
Implemented enhancements:
- Allow to install consul through local archive files #656 (2fa)
- use X-Consul-Token header instead of token query parameter #655 (jardleex)
- Add support for GRPC check #648 (wilfriedroset)
v8.0.0 (2023-10-31)
Breaking changes:
- Update default version 1.16.1->1.16.3 #643 (bastelfreak)
- Update default consul version 1.2.3->1.16.1 #637 (bastelfreak)
- Drop Puppet 6 support #626 (bastelfreak)
Implemented enhancements:
- Add AlmaLinux/Rocky support #646 (bastelfreak)
- Add EL9 support #645 (bastelfreak)
- Add Debian 12 support #644 (bastelfreak)
- Add Puppet 8 support #628 (bastelfreak)
- bump puppet/systemd to \< 5.0.0 #622 (jhoblitt)
- Implement Sensitive support for config #614 (bastelfreak)
Fixed bugs:
- fixed systemd err "Failed to parse service type, ignoring: exec" #641 (fb929)
- CI: Use Type=exec instead of Type=notify #638 (bastelfreak)
- systemd template: add missing space #635 (bastelfreak)
Closed issues:
- systemd Failed to parse service type, ignoring: exec #640
- Adding ACLS / Policies failes with unable to get local issuer certificate -> Puppet 6 / LetsEncrypt #623
Merged pull requests:
- enhance acceptance tests #639 (bastelfreak)
- Replace legacy merge() with native puppet code #636 (bastelfreak)
- puppet/hashi_stack: Allow 3.x #634 (bastelfreak)
- puppet/archive: Allow 7.x #633 (bastelfreak)
- puppetlabs/stdlib: Allow 9.x #632 (bastelfreak)
- puppet/systemd: Allow 5.x #631 (bastelfreak)
- Update metadata.json #624 (kengelhardt-godaddy)
- correct original author in README.md #620 (bastelfreak)
- README.md: fix wrong camptocamp references #619 (bastelfreak)
- puppet-lint: enforce parameter documentation #618 (bastelfreak)
- Convert classes to puppet-strings #617 (bastelfreak)
- mark internal classes as private #616 (bastelfreak)
- systemd service: Switch erb to epp template #615 (bastelfreak)
v7.3.1 (2022-10-26)
Fixed bugs:
- manage_repo: ensure that we refresh the package list before installing consul #612 (bastelfreak)
v7.3.0 (2022-10-24)
Implemented enhancements:
- Drop legacy init scripts #609 (bastelfreak)
- Add Debian 11 support #608 (bastelfreak)
- Add Ubuntu 22.04 support #607 (bastelfreak)
- Document and test package based installation #606 (bastelfreak)
Fixed bugs:
- Package install: Fix ordering when data_dir isnt managed #610 (bastelfreak)
v7.2.0 (2022-08-22)
Implemented enhancements:
Closed issues:
- legacy ACL v1 no longer working starting from Consul version 1.11 #588
v7.1.0 (2022-04-20)
Implemented enhancements:
- Adding datacenters property for Consul policies #590 (jonesbrennan)
- Add special rule format for keyring type policy #582 (weastur)
- Allow changing the configuration directory and files owner #535 (thias)
Closed issues:
Merged pull requests:
- puppet/archive & puppetlabs/stdli: Allow latest versions #594 (bastelfreak)
- Cleanup metadata.json/README.md after migration #593 (bastelfreak)
- updating README.md for consul version compatibility #592 (jonesbrennan)
- Switch from camptocamp/systemd to puppet/systemd #586 (bastelfreak)
- Run unit tests on CI #583 (weastur)
v7.0.2 (2021-06-12)
Closed issues:
- Module Release? #578
Merged pull requests:
- enable ssl when protocol is https #577 (LadyNamedLaura)
v7.0.1 (2021-06-12)
Fixed bugs:
Closed issues:
- Migrate from master to main #572
- New Home Attribute on consul user resource breaks our puppet runs. #559
- Compatibility with Puppet 3.6 #503
- upgrade puppetlabs-stdlib version in dependencies to \< 7.0.0? #496
- service weights needs integer #492
Merged pull requests:
- Release v7.0.0 #574 (solarkennedy)
v7.0.0 (2021-05-12)
Breaking changes:
- Drop support for EoL Puppet 5 #571
- Drop support for old SLES/SLED versions #570
- Drop EoL FreeBSD 10 support #569
- Drop EoL Fedora 25/26/27 support #568
- Drop EoL Amazon Linux support #567
- Drop EoL Ubuntu 16.04 support #566
- Drop EoL CentOS/RHEL 6 support #565
- consul user: set correct home #550 (bastelfreak)
Implemented enhancements:
Fixed bugs:
Closed issues:
- Registering multiple services from same node/instance with same name #562
- HCL Config Support #557
- Can not download the archive. need to allow insecure access to download for archive #553
- Home directory not created for consul user #533
- Service port gets quoted with a puppet 6.10 catalog server and consul rejects it #526
Merged pull requests:
- List Debian 10 as supported #573 (genebean)
- OS and Puppet versions update #564 (genebean)
- PDK update, move CI to GH Actions #563 (genebean)
- adding the option to setup the upstream HashiCorp repository #560 (attachmentgenie)
- Add config_name parameter to define the name of the consul config #558 (bogdankatishev)
- Add description parameter for token #556 (Hexta)
- Add new check options #555 (Rekenn)
- notify systemd when consul daemon is really started #552 (ymartin-ovh)
- Added stale bot to close super old issues #549 (solarkennedy)
- Make stringification a parameter of the sorted_json helper functions #547 (rtkennedy)
v6.1.0 (2020-08-18)
Fixed bugs:
- Sysv init script: redirect stderr to logfile #545 (bastelfreak)
Closed issues:
- No obvious support for setting headers for inline service checks #542
- Add support for Ingress Controllers using Configuration Entries #538
- Define service without including consul #question #536
- What do I need to do to to get the nslcd service started before the Consul service #531
- Consul user not found in /etc/passwd issue #530
- Can't set consul watch from hiera #518
- Clarification - What is acl_api_token? #505
- consul_token is not idempotent #490
- Support for External Services #252
Merged pull requests:
- Add example http service, including a check that demonstrates how to pass headers #543 (chrisjohnson)
- update to support raspberry pi arm arch with Hashicorp splitting out file names #540 (ikonia)
- Fix data_dir_mode override #534 (thias)
- Add acl_api_token to service_reload class #532 (cmd-ntrf)
- Removing OpenSuSE from metadata.json to stop triggering broken tests #529 (rtkennedy)
- Use a filter instead of delete_undef_values() #528 (rtkennedy)
- Add option to (un)manage the data_dir #523 (b3n4kh)
- Fix rubocop LineLength # see https://rubocop.readthedocs.io/en/latest… #521 (thomas-merz)
- fix(reload_service): remove typo in reload_options #516 (bmx0r)
v6.0.1 (2019-11-21)
Fixed bugs:
- systemd: Start consul after network is really up #512 (bastelfreak)
- Add a sleep between tries of consul service reload #494 (cmd-ntrf)
Merged pull requests:
- release 6.0.1 #513 (bastelfreak)
v6.0.0 (2019-10-31)
Breaking changes:
- drop EOL Debian 8 / Puppet 4 / Ubuntu 14.04 / CentOS 5 #508 (bastelfreak)
Fixed bugs:
- Fix broken quoting in the config file #509 (maxadamo)
- add support for reload over https #504 (BCarette)
Closed issues:
- Add support for CNI plugins #502
- Example of using ACL's in production? #486
- Puppetforge README and Github README are different #485
Merged pull requests:
- release 6.0.0 #510 (bastelfreak)
- drop puppetlabs/powershell dependency #506 (bastelfreak)
- Bump stdlib & archive versions #501 (jay7x)
- remove failing tests on centos6 + puppet 6 #500 (solarkennedy)
- systemd template: mention it's managed by puppet #495 (bastelfreak)
- Fix typo #489 (spuder)
- Clarify how to use the new acl system #487 (spuder)
v5.1.0 (2019-07-24)
Implemented enhancements:
- Lint, style, and parameter data types #476 (natemccurdy)
- Support for Consul 1.4.0+ ACL system #474 (marius-meissner)
- quote all values of tags, meta & node_meta #473 (tmu-sprd)
Closed issues:
- Feature Request: support special policies like
acl
andoperator
without segment option #482 - New 1.4+ ACL support is not idempotent #479
- option to strip binary #478
- [Feature request] Provide support for Consul 1.4.0+ ACL System #471
- Can we get a new release to forge soon? #469
- Can't use integer on meta hash on services #468
- Quoted integer (string) to integer is breaking tags #283
Merged pull requests:
- resources 'acl' and 'operator' don't have a segment #483 (tmu-sprd)
- Fixing idempotence issues of new ACL system + improved handling of properties #480 (marius-meissner)
- Switch from anchor pattern to contain function #475 (natemccurdy)
- fix case where multiple http_addr #470 (robmbrooks)
v5.0.4 (2019-02-10)
Breaking changes:
- Updated windows support #464 (KZachariassen)
Implemented enhancements:
- add optional service meta hash #466 (jardleex)
- Add service_config_hash to customize services #460 (dan-wittenberg)
Fixed bugs:
- Don't write out meta parameter when unset #467 (jarro2783)
- Change allow for spaces in the path, Add extra_options to the win agent #459 (monkey670)
Merged pull requests:
- PDK convert, merged changes, pdk validate linter cleanup of pp files #463 (dan-wittenberg)
v5.0.3 (2018-12-15)
Fixed bugs:
- Don't monkey-patch the JSON module #456 (joshuaspence)
Closed issues:
Merged pull requests:
- release 5.0.2 #457 (bastelfreak)
v5.0.1 (2018-10-31)
Breaking changes:
- Puppet 6 support #444 (l-lotz)
- bump default consul version from 0.7.4 to 1.2.3 #443 (bastelfreak)
Fixed bugs:
- undefined method
validate_checks
on puppet 5.5.7/6.0.3 #448 - Wrong init provider on Ubuntu 14.04 #438
- Change "enableTagOverride" to "enable_tag_override" in version 1.0.0 and … #447 (wenzhengjiang)
Closed issues:
Merged pull requests:
- release 5.0.0 #449 (bastelfreak)
v4.0.0 (2018-10-05)
v3.4.2 (2018-10-03)
v3.4.1 (2018-10-03)
Closed issues:
Merged pull requests:
- Allow puppetlabs-stdlib v5.x #440 (hfm)
- allow camptocamp/systemd 2.x #439 (l-lotz)
- Fix broken testmatrix due to gem updates #437 (bastelfreak)
- Update Readme.md to Include Telemetry Settings #432 (ghost)
v3.4.0 (2018-07-05)
Implemented enhancements:
- Add tests for raft_multiplier #429 (bastelfreak)
- allow management of CAP_NET_BIND_SERVICE via systemd #427 (bastelfreak)
- add support for the beta UI #417 (bastelfreak)
- Add AArch64 (arm64) support #409 (ajungren)
- Add new parameters to configure consul permissions in the binary #408 (cristianjuve)
- Support space-separated list in addresses #406 (sw0x2A)
- Add
args
parameter toconsul::watch
#404 (scottybrisbane)
Fixed bugs:
Closed issues:
- Performance Raft Multiplier #426
- Consul 1.1.0 uses a new key for enableTagOverride #420
- Allow for different consul and consul-ui versions. #384
- uid/gid #353
- Run configtest before reloading service #338
- New prepared queries provider not accepting integers #291
- Consul binary not found when puppet agent is daemonized #290
- systemd Client Nodes Not Properly Leaving Cluster on Shutdown #282
- Add Support for Windows #195
Merged pull requests:
- Release 3.4.0 #430 (bastelfreak)
- Add CentOS 6/7 acceptance tests #425 (bastelfreak)
- Add Ubuntu 18.04 / 16.04 support #424 (bastelfreak)
- Bump archive dependency to allow 3.X releases #423 (bastelfreak)
- Use $consul::version instead of facter consul_version (Fix 09297fa) #419 (hfm)
- Change enableTagOverride to enable_tag_override in Consul 1.1.0 and later #418 (hfm)
- enable acceptance tests on travis #416 (bastelfreak)
v3.3.1 (2018-01-27)
Closed issues:
- module errors on posix systems without unzip #402
- Support for Amazon 2 OS #396
- Latest version doesn't work with Puppet 3.x (breaking change?) #394
- Changing Consul kv values doesn't seem to have an effect #374
- Clean out fixtures prior to uploading to forge #349
Merged pull requests:
- Added experimental Windows support #403 (iwagnerclgx)
- Removed command substitution in init script #401 (tooooots)
- Add
args
parameter toconsul::check
#400 (joshuaspence) - Added the ui parameter and removed ui_* ones #398 (rawleto)
- support Amazon Linux 2 #397 (vchan2002)
v3.2.4 (2017-12-05)
Merged pull requests:
- set correct namespace for systemd dependency #393 (bastelfreak)
v3.2.3 (2017-12-05)
v3.2.2 (2017-12-05)
Closed issues:
- consul_sorted_json for octal notation of file modes #389
- Add hiera wrapper for ACL entries. #385
- Config validation failed #383
- default config_dir broken on FreeBSD #360
- Consul 0.8.0 is out! and it breaks a few things... #331
Merged pull requests:
- simplify systemd setup by using camptocamp/systemd #392 (bastelfreak)
- Do not unquote integers with a leading zero #391 (phaer)
- replace fedora versions with current supported ones #390 (bastelfreak)
- set sane default shell for consul user #388 (bastelfreak)
- fix typo in check timeout #387 (lobeck)
- Fixes #360 by setting config_dir under FreeBSD #386 (madelaney)
- allow "args" and "script" for consul check config #382 (zg)
- Breaking: Update Puppet version to 4.7.1 and add data types #381 (wyardley)
- Handle consul_acl connection refused as a retry-able error #336 (kpaulisse)
v3.2.0 (2017-11-20)
Closed issues:
- Validate command for config files doesn't work #376
Merged pull requests:
- Removing the consul config check #380 (Faffnir)
- [issue/376] #379 (khdevel)
- Fix updating of Consul KV store #378 (dannytrigo)
- Fix validate command for config files in consul 1.0.0 #377 (Faffnir)
v3.1.2 (2017-10-26)
v3.1.1 (2017-10-24)
Closed issues:
- what ACL rights required for consul_acl part to run? #373
- Consul k/v does not update to new value #363
- How do you ensure unzip is installed? #356
- changes to systemd template #354
- Support for cloud -join switches #350
- Switch from
%{linenumber}
to%{line}
in v2 branch #346 - 3.0.0 not tagged? #343
Merged pull requests:
- Validate config file before deploying #372 (kasimon)
- use proper systemd custom .service directory #366 (foxxx0)
- (#359) Datacenter support to consul_key_value #365 (houtmanj)
- Don't pin so hard on ruby versions on travis #362 (solarkennedy)
- Fix issue with init script #361 (brandonrdn)
- added docker support #357 (Justin-DynamicD)
- allow to specify a proxy server for package downloads #351 (xavvo)
- Support "Near" parameter in prepared queries #348 (tlevi)
- support other unspecified RedHat variants #341 (cspargo)
- Notify the service when package is updated #340 (jaxxstorm)
- Test changes for property #334 (jk2l)
- Ensure /usr/local/bin is in the path for consul binary #313 (mspaulding06)
v3.0.0 (2017-04-19)
Closed issues:
- Execution of 'unzip -o /var/lib/consul/archives/consul-0.7.4.zip' returned 1: #332
- please specify json module version minimum #328
- Could not look up qualified variable
$consul_version
#327
Merged pull requests:
v2.1.1 (2017-03-16)
Closed issues:
- Curl return code 35 when fetching the consul binary. #320
- Consul - Error: Invalid parameter temp_dir(:temp_dir) #317
- Error: Cannot create /opt/consul/archives; parent directory /opt/consul does not exist #311
- consul_acl created on every puppet run #211
Merged pull requests:
- Try pinning more things in fixtures #326 (solarkennedy)
- Remove unnecessary .gitkeep files in lib/ #325 (cosmopetrich)
- Fix idempotent issue within key_value runs. #323 (jrasell)
- Reduce travis matrix #322 (solarkennedy)
- Bump default consul version. Improve FreeBSD support #319 (olevole)
- Fix
consul_version
fact lookup during installation #316 (wstiern)
v2.1.0 (2017-01-12)
Closed issues:
- Annoying "defined 'protocol' as 'http' " for every consul_acl resource #310
- Issues with default data-dir post-#292 #307
Merged pull requests:
- Actually fix the changes every run problem #315 (mrwulf)
- Changes every run #312 (mrwulf)
- Better acl rules message #309 (mrwulf)
- Use data_dir as a the root of the archive path. Fixes #307 #308 (solarkennedy)
v2.0.0 (2016-12-29)
Implemented enhancements:
- Support for prepared queries #239
Closed issues:
- cant use latest consul version as parameter #305
- EC2 Join Support #302
- Consul user is created with login shell #293
- Validate and document all params that could be passed to
consul
#170
Merged pull requests:
- Add support of custom log_file in sles and upstart init scripts #306 (AlexLov)
- More Systemd unit file improvements #304 (amiryal)
- Check
$consul_version
more correctly #303 (logic) - Cleanup Systemd unit file #301 (amiryal)
- Fixing init service start/stop messages and locks #300 (mrwulf)
- Initial support for FreeBSD platform #299 (olevole)
- Revert "Set login shell for consul user to /sbin/nologin" #298 (solarkennedy)
- Set login shell for consul user to /sbin/nologin #297 (madAndroid)
- add support for prepared query templates #296 (adamcstephens)
- KV Provider / Prepared Query Bugfixes #294 (djtaylor)
- BREAKING: Change the default 'archive_path' to '/opt/consul/archives'. #292 (jmkeyes)
- ADD parameter "log_file" for custom log location #289 (miso231)
- Prepared Queries #288 (djtaylor)
- Catch :undef when pretty-printing in consul_sorted_json.rb #287 (tdevelioglu)
- Reduce the travis matrix even more #286 (solarkennedy)
- Remove puppet error when ACLs cannot be retrieved #285 (thejandroman)
- Drop pinning for 1.8.7 as there are no tests for it anymore. #281 (tdevelioglu)
v1.1.0 (2016-09-23)
Merged pull requests:
- Update downloaded version to latest stable (0.7.0) #280 (tdevelioglu)
v1.0.12 (2016-09-23)
Closed issues:
- Support for puppet-archive >=1.0.0 #275
- Consul service is not starting up #273
- Question: URL method downloads the zip file every run? #270
- Add proxy support #269
- Changelog on Puppetforge not updated for 1.0.9 #268
- Support talking to Consul over https for ACL operations #217
- consul_acl makes api call before ACL api is available #193
Merged pull requests:
- Decouple service from init system #279 (tdevelioglu)
- Polish #278 (tdevelioglu)
- Require a new version of puppet-archive #277 (solarkennedy)
- Allow for stable versions of puppet/archive #276 (ghoneycutt)
- add retry logic when contacting the REST API for listing ACL resources #274 (cjdaniel)
- Rebase #218 #271 (solarkennedy)
v1.0.10 (2016-06-23)
v1.0.9 (2016-06-20)
Closed issues:
- enableTagOverride value being written as a quoted string, need to be unquote boolean. #261
- /opt/consul/serf/local.keyring is not replaced when changing encryption keys #256
- Error depencie archive #253
- nanliu-staging dependency #250
- chkconfig init files are not setup for consul on CentOS 6 #249
- Failed to start Raft: permission denied #237
- Question : Atlas join #228
- InitV startup script doesn't deamonize proprely #210
- Consul 0.6 support #204
- Why is ACL ID read-only? #192
Merged pull requests:
- Configure log file for upstart. #265 (jdavisp3)
- Handle nested :undef in consul_sorted_json #263 (mcasper)
- drop bool2str as we need a unquoted true|false #262 (sjoeboo)
- Added a parameter to allow users to change $install_path #260 (tfhartmann)
- Drop ruby 1.8 support again now that puppet-archive doesn't support it #259 (solarkennedy)
- service EnableTagOverride #258 (cliles)
- adding ability to define the inital status of consul checks #257 (asgolding)
- Puppet archive install directory will fail if default umask changed #255 (lynxman)
- in dynamic environment consul-agent should be init #254 (mcortinas)
- fix tests #251 (solarkennedy)
v1.0.8 (2016-04-13)
Closed issues:
- Switch from using staging module to archive #242
- Service start is broken on Debian > 8.0 #232
- Services variable not working with hiera hash. Expects an array of hashes it seems. #230
- ensure_packages unzip with 'before' breaks interoperability #187
- Setting consul::version in hiera does not change the download_url #129
- add maintenance mode option to init scripts #124
- Watches key in config_hash should expect an array of hashes? #83
v1.0.6 (2016-03-24)
Closed issues:
- Master broken on EL6 due to "Invalid service provider 'sysv'" #240
- Service reload too quick #231
- Systemd limits issue #225
- Encryption #224
- Duplicate declaration: Class[Staging] with puppet/mysql mysqltuner #223
- Consul reload fails when rpc_addr is 0.0.0.0 #220
- Support creating ACLs while talking to a hostname other than localhost #216
- Release version 1.0.5 #215
Merged pull requests:
- Switching from staging to archive module #243 (hopperd)
- EL \< 7 uses init service provider, not sysv. #241 (fatmcgav)
- Update reload_service.pp #235 (nvtkaszpir)
- add support for arm (Raspberry pi's ARM here) architecture #234 (gibre)
- Added custom init style "custom" #233 (sy-be)
- lazily return nil when consul client isn't installed #227 (roobert)
- add NOFILE limit to systemd template #226 (eliranbz)
- Debian init script should depend on networking, resolution and syslog #222 (chrisboulton)
- When reloading consul, use 127.0.0.1 as rpc_addr when rpc_addr was set to 0.0.0.0 #221 (danielbenzvi)
- Add hostname proprety for ACL operations, defaults to localhost, like before #219 (gozer)
- Consul Version Fact #209 (robrankin)
- Set provider on consul service #125 (albustax)
v1.0.5 (2016-01-08)
Fixed bugs:
- umask feature breaks CentOS init scripts #107
Closed issues:
- If $install_method = 'url', won't upgrade consul #103
Merged pull requests:
- ACL fixes - idempotentcy and port bug. #214 (sigerber)
- Fix port property #213 (afterwords)
- Add support of OpenSuSE and SLED #212 (kscherer)
- Fix web_ui installation on Consul 0.6.0 and greater #208 (dbeckham)
- mitigate .to_json segfaults on Ruby 1.8.7 #205 (duritong)
v1.0.4 (2015-12-15)
Merged pull requests:
v1.0.3 (2015-12-10)
Closed issues:
- Default mode on config.json and service files is too permissive #199
- Wrong number of arguments given #194
- metadata.json - needs at least 4.6.0 of stdlib #190
- Strange (probably unnecessary) behavior in sysv stop script #174
Merged pull requests:
- Updating staging file download to use the version and symlink #202 (hopperd)
- Updated download_urls used to be the new releases.hashicorp.com location #201 (hopperd)
- parameterize config file mode #200 (aj-jester)
- Add parameter for setting port to custom acl type #197 (afterwords)
- Allow ACL ID to be writeable #196 (robrankin)
- need at least 4.6.0 of puppetlabs/stdlib #191 (gdhbashton)
- Remove management of unzip package #189 (danieldreier)
- consul init sysv: lower stop priority #188 (koendc)
- actually we want to escape / globally for filenames #186 (duritong)
- Fixed chuid / consul executed as root #183 (sw0x2A)
- Rework sysv stop script to fix issues #181 (pforman)
- explicitly define ownership of config directory, installation breaks for hardened Linux boxes with default umask of 0077 - this fixes the problem #168 (proletaryo)
v1.0.2 (2015-09-05)
Closed issues:
- Log rotation? #182
- Staging missing dependency on
Package['unzip']
#164 - Documentation #161
- Ruby 1.8 support #148
- GOMAXPROCS discarded by upstart init due to sudo's env_reset option #126
- Module should have a CHANGELOG #122
- Debian: /var/run/consul/consul.pid user affinity inconsistent #120
- config_hash converts strings to integers => breaks port mappings #119
- Invalid resource type staging::file #117
- Need to add -data-dir option to startup scripts. #115
- Meta stuff Not up to snuff #76
- Send SIGHUP to consul agent when new checks/services are detected #43
- Support consul-template #36
Merged pull requests:
- Update beaker tests + travis integration #180 (solarkennedy)
- fix 'consul reload' on custom rpc port #179 (mdelagrange)
- More rpc port support for debian/upstart #177 (solarkennedy)
- Archlinux support #176 (vdloo)
- pretty config (that properly sorts) #175 (aj-jester)
- prevent unnecessary consul restarts on puppet runs #173 (mdelagrange)
- Add a check for $service_ensure in reload_service #172 (pforman)
- deep_merge to support nested objects #171 (aj-jester)
- parameterize restart on change for the main config #169 (aj-jester)
- unzip depedency for staging #166 (aj-jester)
- Adding support for Ubuntu 15.04 #163 (asasfu)
- Ensure all network interfaces are up before starting in upstart config #162 (jbarbuto)
- UI dir symlink should depend on the dist existing #158 (jsok)
- remove string casting to int #157 (aj-jester)
- convert quoted integers to int object #156 (aj-jester)
- Update the gemfile, hopefully to something beaker and puppet-rspec can tolerate #154 (solarkennedy)
- travis update #153 (jlambert121)
- reload on service, checks and watch changes #152 (aj-jester)
- acl token support for services and checks #151 (aj-jester)
- Modify consul_validate_checks to work with ruby 1.8 #149 (solarnz)
- Adding groups parameter to user definition #147 (robrankin)
- upstart: Agents should gracefully leave cluster on stop #146 (jsok)
- explicitly set depedencies for package install #145 (jlambert121)
- Use strict vars all the time, and future parser for later versions #144 (solarkennedy)
- add puppet 4 testing to travis #143 (jlambert121)
- create user/group as system accounts #142 (jlambert121)
- correct links for consul template #140 (jlambert121)
- compatibiliy fix: ensure variables are defined #139 (mklette)
- Pass ensure to service definition file #138 (mklette)
- Fix debian init #137 (dizzythinks)
- update default consul version #136 (jlambert121)
- Make consul::install optional #135 (potto007)
- Add an exec to daemon-reload systemctl when the unit-file changes #134 (robrankin)
- Fix issue #129 - https://github.com/solarkennedy/puppet-consul/issues/129 #133 (potto007)
- Escape the ID & make fixtures useable more widely #132 (duritong)
- Change name of File['config.json'] to File['consul config.json'] #131 (EvanKrall)
- Switch to using start-stop-daemon for consul upstart init script #130 (bdellegrazie)
- Supply optional token for ACL changes #128 (mdelagrange)
- Fix pidfile handling on Debian #121 (weitzj)
v1.0.0 (2015-04-30)
Closed issues:
- README for consul::service is out of date #110
- delete_undef_values required stdlib 4.2.0, dependency not set properly #109
- init script doesn't have data-dir (0.5.0) #100
- passingonly needs to be a boolean for watch type #97
- Dependency cycle using consul::services #90
- consul should not 'leave' for init script 'stop' action #85
- Cycling dependancy in Hiera-based config #81
- Support for Consul 0.5.0 and multiple check configuration #73
- Path to /home/kyle is hard coded, somewhere #65
Merged pull requests:
- Debian 8.0+ uses systemd #113 (CyBeRoni)
- Update README, ensure passingonly is a bool #112 (zxjinn)
- Update puppetlabs-stdlib dependency to 4.2.0 for the delete_undef_values function #111 (zxjinn)
- Revert "Allow setting of the umask for the consul daemon." #108 (sjoeboo)
- Allow setting of the umask for the consul daemon. #106 (EvanKrall)
- Respect user and group in launchd. #105 (EvanKrall)
- Anchor the consul install/config/run_service classes #102 (koendc)
- Added support for consul 0.5.0 features: #99 (hopperd)
- make module work with future parser #92 (duritong)
- Add consul_acl type and provider #91 (michaeltchapman)
- Consul expects prefix rather than keyprefix in watch config #89 (codesplicer)
- Expose id parameter for service definitions #88 (codesplicer)
- sysv & debian init updates to kill or leave #87 (runswithd6s)
- Updated the params for OracleLinux Support #84 (MarsuperMammal)
- Fixes #81 bugfix cycle dependency when specifying a service #82 (tayzlor)
- Added compatibility for Scientific Linux #78 (tracyde)
- More lint fixes #77 (solarkennedy)
- Support for Amazon OS #68 (dcoxall)
v0.4.6 (2015-01-23)
Closed issues:
- Consul init scripts sometimes not installed in the correct order #74
Merged pull requests:
- Move init script to config.pp to ensure it gets set AFTER the package gets installed #75 (tayzlor)
- Add support for providing watches/checks/services via hiera #72 (tayzlor)
- Fix Puppet 3.7.3 giving evaluation error in run_service.pp #71 (tayzlor)
- Update install.pp #69 (ianlunam)
- Adding ability to disable managing of the service #67 (sedan07)
- Some linting fixes and resolves joining wan not actually joining the wan #66 (justicel)
- Better OS support for init_style #63 (nukemberg)
v0.4.5 (2015-01-16)
Merged pull requests:
v0.4.4 (2015-01-16)
Closed issues:
- Allow Consul clients to join cluster #61
- new function sorted_json does not work if keys are set to undef #59
- Bump to hashicorp/consul GitHub version e9615c50e6 #58
- cannot generate right retry_join string #57
- join_cluster not working on agents #56
- Multiple consul::service with same name causes ArgumentError #46
- service definition file will be changed frequently #45
- cut a new release? #41
- join_cluster doesn't seem to work in some cases #31
- Tests need ruby >= 1.9.2 #7
Merged pull requests:
- Allow hash keys to be set to undef #60 (bodepd)
- Add config_defaults hash parameter #54 (michaeltchapman)
- Make init_style can be disabled #53 (tiewei)
- Make rake spec running #52 (tiewei)
- use versioncmp to compare versions #49 (jfroche)
- Allow overriding a service's name #47 (jsok)
- Make puppet-consul install on OS X #44 (EvanKrall)
v0.4.2 (2014-10-28)
v0.4.1 (2014-10-28)
Closed issues:
- Add support for joining multiple datacenters #34
- Configuring consul client nodes #26
- Add support for the new "watch" resource exposed in Consul 0.4.0 #23
- Install ui broken ? #19
Merged pull requests:
- Set default of GOMAXPROCS=2 for SLES #40 (tehranian)
- Fix the GOMAXPROCS warning for Upstart-based systems #39 (tehranian)
- bump to version 0.4.1 #38 (kennyg)
- Add sysconfig support for sysv #37 (dblessing)
- Add join_wan feature #35 (dblessing)
- Version bump; Download Consul 0.4.0 #33 (tehranian)
- Add support for SLES #32 (tehranian)
- Add option to purge config dir #30 (sorenisanerd)
- Changed cluster join code #29 (hkumarmk)
- (retry) Service Definition documentation and fix #28 (benschw)
- Adding in explicit support for "watches" #24 (jrnt30)
- Added join_cluster param to have consul join a cluster after (re)starting service #21 (tylerwalts)
- Fixing gui_package install #20 (KrisBuytaert)
- Added upstart link for old init.d functionality on upstart jobs #18 (lynxman)
- bump to version 0.3.1 #17 (kennyg)
- Install the consul web ui #15 (croomes)
- Adds systemd support #14 (croomes)
- Update CONTRIBUTORS #12 (kennyg)
- bumped to version 0.3.0 #11 (kennyg)
v0.3.0 (2014-06-20)
Closed issues:
Merged pull requests:
- Add extra_options parameter, to allow extra arguments to the consul agent #9 (EvanKrall)
- Define consul::service and consul::check types #8 (EvanKrall)
- Convert from setuid/setgid to sudo for Lucid support. Allow for group management. #6 (EvanKrall)
- Make download actually work #3 (nberlee)
- Make example config parseable #2 (nberlee)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppet/systemd (>= 3.1.0 < 8.0.0)
- puppet/archive (>= 5.0.0 < 8.0.0)
- puppet/hashi_stack (>= 2.0.0 < 4.0.0)
- puppetlabs/stdlib (>= 6.6.0 < 10.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.