1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fixtures:
inifile: 'https://github.com/puppetlabs/puppetlabs-inifile.git'
puppetdb: 'https://github.com/puppetlabs/puppetlabs-puppetdb.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
yumrepo_core:
repo: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'
puppet_version: '>= 6.0.0'
2 changes: 0 additions & 2 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
beaker_sets:
- centos7-64
- centos6-64
- debian8-64
- debian9-64
env:
global:
- PARALLEL_TEST_PROCESSORS=8
beaker_puppet_collections:
- pc1
- puppet5
- puppet6
Rakefile:
Expand Down
80 changes: 1 addition & 79 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
---
# This file is managed centrally by modulesync
# https://github.com/theforeman/foreman-installer-modulesync
rvm:
- 2.1.9
- 2.3.0
- 2.4.1
env:
matrix:
- PUPPET_VERSION=4.9
global:
- PARALLEL_TEST_PROCESSORS=8
matrix:
fast_finish: true
include:
- rvm: 2.4.1
env: PUPPET_VERSION=5.0
- rvm: 2.5.1
env: PUPPET_VERSION=5.0
- rvm: 2.5.1
env: PUPPET_VERSION=6.0
# Acceptance tests
- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=pc1
- BEAKER_setfile=centos7-64{hostname=centos7-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
Expand All @@ -53,17 +34,6 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=pc1
- BEAKER_setfile=centos6-64{hostname=centos6-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
Expand All @@ -86,50 +56,6 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=pc1
- BEAKER_setfile=debian8-64{hostname=debian8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- BEAKER_setfile=debian8-64{hostname=debian8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- BEAKER_setfile=debian8-64{hostname=debian8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=pc1
- BEAKER_setfile=debian9-64{hostname=debian9-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
Expand All @@ -153,8 +79,4 @@ matrix:
- sudo service docker restart

bundler_args: --without system_tests development
before_install:
- if [ $TRAVIS_RUBY_VERSION = 2.1.9 ] ; then
gem install -v 1.17.3 bundler --no-rdoc --no-ri;
fi
sudo: false
dist: xenial
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [12.0.0](https://github.com/theforeman/puppet-puppet/tree/12.0.0) (2019-04-17)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/11.0.1...12.0.0)

**Breaking changes:**

- Use current timeout management variables [\#693](https://github.com/theforeman/puppet-puppet/pull/693) ([ekohl](https://github.com/ekohl))
- remove Debian 8 support [\#688](https://github.com/theforeman/puppet-puppet/pull/688) ([mmoll](https://github.com/mmoll))
- drop Puppet 4 [\#685](https://github.com/theforeman/puppet-puppet/pull/685) ([mmoll](https://github.com/mmoll))
- drop EOL OSes [\#684](https://github.com/theforeman/puppet-puppet/pull/684) ([mmoll](https://github.com/mmoll))

**Implemented enhancements:**

- Configurable minute and hour for cronjob and systemd.timer [\#690](https://github.com/theforeman/puppet-puppet/pull/690) ([mauricemeyer](https://github.com/mauricemeyer))
- add Puppetserver 6.3 auth.conf update [\#689](https://github.com/theforeman/puppet-puppet/pull/689) ([mmoll](https://github.com/mmoll))
- add 2018 to osreleasemajor for agent\_restart\_command [\#686](https://github.com/theforeman/puppet-puppet/pull/686) ([cabrinha](https://github.com/cabrinha))
- Handle the pluginsync setting deprecation [\#683](https://github.com/theforeman/puppet-puppet/pull/683) ([ekohl](https://github.com/ekohl))
- Move client\_certname to \[main\] [\#681](https://github.com/theforeman/puppet-puppet/pull/681) ([baurmatt](https://github.com/baurmatt))
- Implement $server\_max\_open\_files [\#671](https://github.com/theforeman/puppet-puppet/pull/671) ([baurmatt](https://github.com/baurmatt))

## [11.0.1](https://github.com/theforeman/puppet-puppet/tree/11.0.1) (2019-04-02)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/11.0.0...11.0.1)

**Fixed bugs:**

- Fixes [\#26199](https://projects.theforeman.org/issues/26199) - Fix dependency cycle when using git\_repo [\#682](https://github.com/theforeman/puppet-puppet/pull/682) ([ekohl](https://github.com/ekohl))
- Quick fix for Windows agent restart loop \#678 [\#679](https://github.com/theforeman/puppet-puppet/pull/679) ([anthonysomerset](https://github.com/anthonysomerset))

## [11.0.0](https://github.com/theforeman/puppet-puppet/tree/11.0.0) (2019-01-14)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/10.1.0...11.0.0)
Expand All @@ -11,6 +40,7 @@
- Remove dynamic and config environments [\#653](https://github.com/theforeman/puppet-puppet/pull/653) ([ekohl](https://github.com/ekohl))
- Remove passenger support [\#650](https://github.com/theforeman/puppet-puppet/pull/650) ([ekohl](https://github.com/ekohl))
- Drop support for puppetserver \< 2.7 [\#649](https://github.com/theforeman/puppet-puppet/pull/649) ([ekohl](https://github.com/ekohl))
- namespace extlib functions [\#639](https://github.com/theforeman/puppet-puppet/pull/639) ([mmoll](https://github.com/mmoll))

**Implemented enhancements:**

Expand All @@ -19,7 +49,6 @@
- Config file updates and FreeBSD refactorings [\#664](https://github.com/theforeman/puppet-puppet/pull/664) ([mmoll](https://github.com/mmoll))
- Set more data types and document classes & defines [\#663](https://github.com/theforeman/puppet-puppet/pull/663) ([ekohl](https://github.com/ekohl))
- Add unmanaged Puppet Agent runmode [\#659](https://github.com/theforeman/puppet-puppet/pull/659) ([Rathios](https://github.com/Rathios))
- namespace extlib functions [\#639](https://github.com/theforeman/puppet-puppet/pull/639) ([mmoll](https://github.com/mmoll))

**Merged pull requests:**

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

source 'https://rubygems.org'

gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 4.6'
gem 'puppet', ENV.key?('PUPPET_VERSION') ? "~> #{ENV['PUPPET_VERSION']}" : '>= 5.5'

gem 'rake'
gem 'rspec', '~> 3.0'
Expand Down
102 changes: 102 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,105 @@
## [12.0.0](https://github.com/theforeman/puppet-puppet/tree/12.0.0) (2019-04-17)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/11.0.1...12.0.0)

**Breaking changes:**

- Use current timeout management variables [\#693](https://github.com/theforeman/puppet-puppet/pull/693) ([ekohl](https://github.com/ekohl))
- remove Debian 8 support [\#688](https://github.com/theforeman/puppet-puppet/pull/688) ([mmoll](https://github.com/mmoll))
- drop Puppet 4 [\#685](https://github.com/theforeman/puppet-puppet/pull/685) ([mmoll](https://github.com/mmoll))
- drop EOL OSes [\#684](https://github.com/theforeman/puppet-puppet/pull/684) ([mmoll](https://github.com/mmoll))

**Implemented enhancements:**

- Configurable minute and hour for cronjob and systemd.timer [\#690](https://github.com/theforeman/puppet-puppet/pull/690) ([mauricemeyer](https://github.com/mauricemeyer))
- add Puppetserver 6.3 auth.conf update [\#689](https://github.com/theforeman/puppet-puppet/pull/689) ([mmoll](https://github.com/mmoll))
- add 2018 to osreleasemajor for agent\_restart\_command [\#686](https://github.com/theforeman/puppet-puppet/pull/686) ([cabrinha](https://github.com/cabrinha))
- Handle the pluginsync setting deprecation [\#683](https://github.com/theforeman/puppet-puppet/pull/683) ([ekohl](https://github.com/ekohl))
- Move client\_certname to \[main\] [\#681](https://github.com/theforeman/puppet-puppet/pull/681) ([baurmatt](https://github.com/baurmatt))
- Implement $server\_max\_open\_files [\#671](https://github.com/theforeman/puppet-puppet/pull/671) ([baurmatt](https://github.com/baurmatt))

## [11.0.1](https://github.com/theforeman/puppet-puppet/tree/11.0.1) (2019-04-02)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/11.0.0...11.0.1)

**Fixed bugs:**

- Fixes [\#26199](https://projects.theforeman.org/issues/26199) - Fix dependency cycle when using git\_repo [\#682](https://github.com/theforeman/puppet-puppet/pull/682) ([ekohl](https://github.com/ekohl))
- Quick fix for Windows agent restart loop \#678 [\#679](https://github.com/theforeman/puppet-puppet/pull/679) ([anthonysomerset](https://github.com/anthonysomerset))

## [11.0.0](https://github.com/theforeman/puppet-puppet/tree/11.0.0) (2019-01-14)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/10.1.0...11.0.0)

**Breaking changes:**

- Remove left over environment entry [\#662](https://github.com/theforeman/puppet-puppet/pull/662) ([ekohl](https://github.com/ekohl))
- remove apache dependency and leftovers [\#661](https://github.com/theforeman/puppet-puppet/pull/661) ([mmoll](https://github.com/mmoll))
- Remove dynamic and config environments [\#653](https://github.com/theforeman/puppet-puppet/pull/653) ([ekohl](https://github.com/ekohl))
- Remove passenger support [\#650](https://github.com/theforeman/puppet-puppet/pull/650) ([ekohl](https://github.com/ekohl))
- Drop support for puppetserver \< 2.7 [\#649](https://github.com/theforeman/puppet-puppet/pull/649) ([ekohl](https://github.com/ekohl))
- namespace extlib functions [\#639](https://github.com/theforeman/puppet-puppet/pull/639) ([mmoll](https://github.com/mmoll))

**Implemented enhancements:**

- Fixes [\#25839](https://projects.theforeman.org/issues/25839) - Determine puppetserver version in server.pp [\#668](https://github.com/theforeman/puppet-puppet/pull/668) ([ekohl](https://github.com/ekohl))
- Remove $deb\_naio\_package & puppet-common install [\#665](https://github.com/theforeman/puppet-puppet/pull/665) ([ekohl](https://github.com/ekohl))
- Config file updates and FreeBSD refactorings [\#664](https://github.com/theforeman/puppet-puppet/pull/664) ([mmoll](https://github.com/mmoll))
- Set more data types and document classes & defines [\#663](https://github.com/theforeman/puppet-puppet/pull/663) ([ekohl](https://github.com/ekohl))
- Add unmanaged Puppet Agent runmode [\#659](https://github.com/theforeman/puppet-puppet/pull/659) ([Rathios](https://github.com/Rathios))

**Merged pull requests:**

- add Puppetserver 5.x upgrade test [\#667](https://github.com/theforeman/puppet-puppet/pull/667) ([mmoll](https://github.com/mmoll))

## [10.1.0](https://github.com/theforeman/puppet-puppet/tree/10.1.0) (2018-12-06)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/10.0.0...10.1.0)

**Implemented enhancements:**

- Add support for managing jetty threads [\#647](https://github.com/theforeman/puppet-puppet/pull/647) ([bastelfreak](https://github.com/bastelfreak))
- Refactor testing and use data types in private classes [\#645](https://github.com/theforeman/puppet-puppet/pull/645) ([ekohl](https://github.com/ekohl))
- Update CA related files for Puppetserver 5.3.6 [\#643](https://github.com/theforeman/puppet-puppet/pull/643) ([mmoll](https://github.com/mmoll))
- Add Puppet 6 support [\#642](https://github.com/theforeman/puppet-puppet/pull/642) ([ekohl](https://github.com/ekohl))

**Fixed bugs:**

- adjust puppetversion to puppetserver\_version mapping [\#651](https://github.com/theforeman/puppet-puppet/pull/651) ([mmoll](https://github.com/mmoll))

## [10.0.0](https://github.com/theforeman/puppet-puppet/tree/10.0.0) (2018-10-16)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/9.1.0...10.0.0)

**Breaking changes:**

- don't use pupetlabs-hocon for metrics.conf [\#622](https://github.com/theforeman/puppet-puppet/pull/622) ([mmoll](https://github.com/mmoll))
- Revert "use puppetlabs-hocon for webserver.conf" [\#620](https://github.com/theforeman/puppet-puppet/pull/620) ([mmoll](https://github.com/mmoll))
- Revert "use puppetlabs-hocon for product.conf" [\#618](https://github.com/theforeman/puppet-puppet/pull/618) ([mmoll](https://github.com/mmoll))
- Revert "use puppetlabs-{hocon, puppet\_authorization} for auth.conf [\#615](https://github.com/theforeman/puppet-puppet/pull/615) ([mmoll](https://github.com/mmoll))

**Implemented enhancements:**

- reduce diff to Puppet distributed files [\#638](https://github.com/theforeman/puppet-puppet/pull/638) ([mmoll](https://github.com/mmoll))
- Make `splaylimit` & `runinterval` types consistent [\#623](https://github.com/theforeman/puppet-puppet/pull/623) ([alexjfisher](https://github.com/alexjfisher))
- add status service endpoint [\#621](https://github.com/theforeman/puppet-puppet/pull/621) ([mmoll](https://github.com/mmoll))
- updated auth.conf for the "puppet facts upload" command \(puppetserver 5.5\) [\#619](https://github.com/theforeman/puppet-puppet/pull/619) ([slauger](https://github.com/slauger))
- Add ability to configure custom\_trusted\_oid\_mapping.yaml [\#603](https://github.com/theforeman/puppet-puppet/pull/603) ([baurmatt](https://github.com/baurmatt))

**Fixed bugs:**

- Add shared gem path for Puppetserver \>= 5.3 [\#631](https://github.com/theforeman/puppet-puppet/pull/631) ([baurmatt](https://github.com/baurmatt))

**Merged pull requests:**

- Allow puppet/extlib 3 [\#637](https://github.com/theforeman/puppet-puppet/pull/637) ([alexjfisher](https://github.com/alexjfisher))
- Use facter 3 facts during tests [\#636](https://github.com/theforeman/puppet-puppet/pull/636) ([alexjfisher](https://github.com/alexjfisher))
- Contain classes [\#635](https://github.com/theforeman/puppet-puppet/pull/635) ([ekohl](https://github.com/ekohl))
- Use `contain` instead of `anchor` pattern [\#627](https://github.com/theforeman/puppet-puppet/pull/627) ([alexjfisher](https://github.com/alexjfisher))
- removing redundant \> character [\#626](https://github.com/theforeman/puppet-puppet/pull/626) ([attachmentgenie](https://github.com/attachmentgenie))
- allow puppetlabs-stdlib 5.x [\#625](https://github.com/theforeman/puppet-puppet/pull/625) ([mmoll](https://github.com/mmoll))
- allow puppetlabs-concat 5.x [\#624](https://github.com/theforeman/puppet-puppet/pull/624) ([mmoll](https://github.com/mmoll))

## [9.1.0](https://github.com/theforeman/puppet-puppet/tree/9.1.0) (2018-07-16)

[Full Changelog](https://github.com/theforeman/puppet-puppet/compare/9.0.3...9.1.0)
Expand Down
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Installs and configures the Puppet agent and optionally a Puppet master (when
`server` is true). Part of the [Foreman installer](https://github.com/theforeman/foreman-installer)
or to be used as a Puppet module.

When using Puppet Server (version 2.2.x is the lowest version, this module supports),
When using Puppet Server (version 5.3.6 is the lowest version, this module supports),
the module supports and assumes you will be installing the latest version.
If you know you'll be installing an earlier or specific version, you will
need to override `server_puppetserver_version`. More information in the Puppet
Expand Down Expand Up @@ -144,18 +144,6 @@ versions, which this module supports. It's recommended that you set the
you have installed. By default the module will configure for the latest
version available.

Currently supported values and configuration behaviours are:

* `5.1.0` (default for Puppet >= 5.1) - configures CRL reload service and `/puppet/v3/tasks` route
* `5.0.0` (default for Puppet 5.0.x) - configures metrics service and `/puppet/experimental` route
* `2.7.x` (default for Puppet < 5) - creates `product.conf`
* `2.5.x`, `2.6.x` - configures the certificate authority in `ca.cfg`
* `2.4.99` - configures for both 2.4 and 2.5, with `bootstrap.cfg`
and `ca.cfg`
* `2.3.x`, `2.4.x` - configures the certificate authority and
versioned-code-service in `bootstrap.cfg`
* `2.2.x` - configures the certificate authority in `bootstrap.cfg`

# Contributing

* Fork the project
Expand Down
21 changes: 15 additions & 6 deletions manifests/agent/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
'localconfig': value => '$vardir/localconfig';
'default_schedules': value => false;
'report': value => $::puppet::report;
'pluginsync': value => $::puppet::pluginsync;
'masterport': value => $::puppet::port;
'environment': value => $::puppet::environment;
'listen': value => $::puppet::listen;
Expand All @@ -16,9 +15,14 @@
'noop': value => $::puppet::agent_noop;
'usecacheonfailure': value => $::puppet::usecacheonfailure;
}
if $::puppet::configtimeout != undef {
if $::puppet::http_connect_timeout != undef {
puppet::config::agent {
'configtimeout': value => $::puppet::configtimeout;
'http_connect_timeout': value => $::puppet::http_connect_timeout;
}
}
if $::puppet::http_read_timeout != undef {
puppet::config::agent {
'http_read_timeout': value => $::puppet::http_read_timeout;
}
}
if $::puppet::prerun_command {
Expand All @@ -31,9 +35,14 @@
'postrun_command': value => $::puppet::postrun_command;
}
}
if $::puppet::client_certname {
puppet::config::agent {
'certname': value => $::puppet::client_certname;

unless $::puppet::pluginsync {
if versioncmp($facts['puppetserver'], '6.0.0') >= 0 {
fail('pluginsync is no longer a setting in Puppet 6')
} else {
puppet::config::agent { 'pluginsync':
value => $::puppet::pluginsync,
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions manifests/agent/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,15 @@

class { 'puppet::agent::service::systemd':
enabled => $systemd_enabled,
hour => $::puppet::run_hour,
minute => $::puppet::run_minute,
}
contain puppet::agent::service::systemd

class { 'puppet::agent::service::cron':
enabled => $cron_enabled,
hour => $::puppet::run_hour,
minute => $::puppet::run_minute,
}
contain puppet::agent::service::cron
}
Loading