66 changes: 60 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,78 @@ matrix:
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
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker\,hostname=centos7-64.example.com}
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- 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=puppet6
- 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
- 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
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker\,hostname=debian8-64.example.com}
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- 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
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker\,hostname=debian9-64.example.com}
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- 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

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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [5.4.0](https://github.com/theforeman/puppet-dns/tree/5.4.0) (2019-01-10)

[Full Changelog](https://github.com/theforeman/puppet-dns/compare/5.3.1...5.4.0)

**Implemented enhancements:**

- Convert documentation to puppet-strings [\#133](https://github.com/theforeman/puppet-dns/pull/133) ([ekohl](https://github.com/ekohl))
- Add keys parameter and create\_resources accordingly [\#130](https://github.com/theforeman/puppet-dns/pull/130) ([marcdeop](https://github.com/marcdeop))
- Add Puppet 6 support [\#129](https://github.com/theforeman/puppet-dns/pull/129) ([ekohl](https://github.com/ekohl))

## [5.3.1](https://github.com/theforeman/puppet-dns/tree/5.3.1) (2018-10-04)

[Full Changelog](https://github.com/theforeman/puppet-dns/compare/5.3.0...5.3.1)
Expand Down
6 changes: 2 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ gem 'rspec-puppet', '~> 2.3'
gem 'rspec-puppet-facts', '>= 1.7'
gem 'puppetlabs_spec_helper', '>= 2.1.1'
gem 'puppet-lint', '>= 2'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-classes_and_types_beginning_with_digits-check'
gem 'puppet-lint-empty_string-check'
gem 'puppet-lint-file_ensure-check'
Expand All @@ -26,9 +25,9 @@ gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-version_comparison-check'
gem 'simplecov'
gem 'github_changelog_generator', {"git"=>"https://github.com/skywinder/github-changelog-generator", "ref"=>"20ee04ba1234e9e83eb2ffb5056e23d641c7a018", "groups"=>["development"]}
gem 'github_changelog_generator', {"git"=>"https://github.com/skywinder/github-changelog-generator", "ref"=>"20ee04ba1234e9e83eb2ffb5056e23d641c7a018", "groups"=>["development"]} if RUBY_VERSION >= '2.2.2'
gem 'puppet-blacksmith', '>= 4.1.0', {"groups"=>["development"]}
gem 'beaker', '>= 4.0.0', {"groups"=>["system_tests"]}
gem 'beaker', '>= 4.2.0', {"groups"=>["system_tests"]}
gem 'beaker-docker', {"groups"=>["system_tests"]}
gem 'beaker-hostgenerator', '>= 1.1.10', {"groups"=>["system_tests"]}
gem 'beaker-puppet', {"groups"=>["system_tests"]}
Expand All @@ -37,7 +36,6 @@ gem 'beaker-module_install_helper', {"groups"=>["system_tests"]}
gem 'beaker-puppet_install_helper', {"groups"=>["system_tests"]}
gem 'metadata-json-lint'
gem 'kafo_module_lint'
gem 'rgen'
gem 'parallel_tests'

# vim:ft=ruby
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Puppet Forge](http://img.shields.io/puppetforge/v/theforeman/dns.svg)](https://forge.puppetlabs.com/theforeman/dns)
[![Puppet Forge](https://img.shields.io/puppetforge/v/theforeman/dns.svg)](https://forge.puppetlabs.com/theforeman/dns)
[![Build Status](https://travis-ci.org/theforeman/puppet-dns.svg?branch=master)](https://travis-ci.org/theforeman/puppet-dns)

# DNS module for Puppet
Expand All @@ -10,18 +10,24 @@ Foreman.

Include the top level `dns` class to fully configure the service.

include ::dns
```puppet
include dns
```

A key is set up to allow dynamic DNS updates, stored in rndc.key. This is used
by Foreman's smart proxy to add and remove records on the fly.

Zones can be created with the `dns::zone` resource:

dns::zone { 'example.com': }
```puppet
dns::zone { 'example.com': }
```

Keys can be created with the `dns::key` resource:

dns::key {'dns-key':}
```puppet
dns::key {'dns-key':}
```

Slaves can also be configured by setting `allow_transfer` in the master's zone
and setting `zonetype => 'slave'` in the slave's zone.
Expand All @@ -41,15 +47,15 @@ See the CONTRIBUTING.md file for much more information.

# More info

See http://theforeman.org or at #theforeman irc channel on freenode
See https://theforeman.org or at #theforeman irc channel on freenode

Copyright (c) 2010-2016 Foreman developers and Zach Leslie

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
https://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,
Expand Down
21 changes: 11 additions & 10 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
# Configure dns
# @api private
class dns::config {
group { $dns::params::group: }

concat { $::dns::publicviewpath:
concat { $dns::publicviewpath:
owner => root,
group => $dns::params::group,
mode => '0640',
}

if $::dns::enable_views {
file { $::dns::viewconfigpath:
if $dns::enable_views {
file { $dns::viewconfigpath:
ensure => directory,
owner => root,
group => $dns::params::group,
mode => '0755',
}
}
concat::fragment { 'dns_zones+01-header.dns':
target => $::dns::publicviewpath,
target => $dns::publicviewpath,
content => ' ',
order => '01',
}

concat { [$::dns::namedconf_path, $::dns::optionspath]:
concat { [$dns::namedconf_path, $dns::optionspath]:
owner => root,
group => $::dns::params::group,
group => $dns::params::group,
mode => '0640',
}

concat::fragment { 'named.conf+10-main.dns':
target => $::dns::namedconf_path,
content => template($::dns::namedconf_template),
target => $dns::namedconf_path,
content => template($dns::namedconf_template),
order => '10',
}

concat::fragment { 'options.conf+10-main.dns':
target => $::dns::optionspath,
content => template($::dns::optionsconf_template),
target => $dns::optionspath,
content => template($dns::optionsconf_template),
order => '10',
}

Expand Down
Loading