Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3115,7 +3115,6 @@ The following parameters are available in the `knot_zone_private` type.
* [`local_subzones`](#-knot_zone_private--local_subzones)
* [`manage_records`](#-knot_zone_private--manage_records)
* [`name`](#-knot_zone_private--name)
* [`provider`](#-knot_zone_private--provider)
* [`serial_policy`](#-knot_zone_private--serial_policy)
* [`show_diff`](#-knot_zone_private--show_diff)

Expand Down Expand Up @@ -3146,11 +3145,6 @@ namevar

name of the zone name as namevar

##### <a name="-knot_zone_private--provider"></a>`provider`

The specific backend to use for this `knot_zone_private` resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.

##### <a name="-knot_zone_private--serial_policy"></a>`serial_policy`

Valid values: `increment`, `unixtime`
Expand Down Expand Up @@ -3966,7 +3960,7 @@ Alias of `String[1]`
subtype: Number of bytes, an integer with a
possible size multiplier suffix (B ~ 1, K ~ 1024, M ~ 1024^2 or G ~ 1024^3)

Alias of `String[1]`
Alias of `Variant[String[1], Integer]`

### <a name="Knot--Subtypes--Time"></a>`Knot::Subtypes::Time`

Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/provider/knot_zone_private/knotc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
require 'tempfile'
Puppet::Type.type(:knot_zone_private).provide(
:knotc
:knotc,
) do
desc "A provider for the resource type `knot_zone`,
which manages a zone on knot dns
Expand Down Expand Up @@ -108,7 +108,7 @@ def content
end
end).compact
glues = glue_records
if (glues & @records) == glues
if @records.allbits?(glues)
"#{(@records - glues).sort.join("\n")}\n"
else
"#{((@records - glues) + ['changing glue records']).sort.join("\n")}\n"
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/knot_zone_private.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
def change_to_s(current, desire)
if @resource[:show_diff]
['', ((desire.split(%r{\n+}) - current.split(%r{\n+})).map { |k| "#{k}+" } +
(current.split(%r{\n+}) - desire.split(%r{\n+})).map { |k| "#{k}-" }).sort.map { |k| " #{k[-1]} #{k[0..-2]} " }, ''].join("\n")
(current.split(%r{\n+}) - desire.split(%r{\n+})).map { |k| "#{k}-" }).sort.map { |k| " #{k[-1]} #{k[0..-2]} " }, '',].join("\n")
else
"{md5}#{Digest::MD5.hexdigest(current.to_s)} to: {md5}#{Digest::MD5.hexdigest(desire.to_s)}"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/backup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
group: 'knot',
mode: '0700',
timer: ['OnCalendar=*-*-* 01:00:00', 'Persistent=true'],
key_stati_file: '/var/lib/knot-backup/current-key-list.txt'
key_stati_file: '/var/lib/knot-backup/current-key-list.txt',
}
end

Expand Down Expand Up @@ -69,7 +69,7 @@
timer: ['OnCalender=\never'],
list_keys_script: '/usr/local/bin/script',
enable: true,
active: true
active: true,
)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/classes/knot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

it {
params[:domains].each do |dom, _vals|
params[:domains].each_key do |dom|
is_expected.to contain_knot__domain(dom)
end
}
Expand All @@ -74,7 +74,7 @@
context 'with non defaults' do
let :params do
default_params.merge(
domains: { 'example.net' => {} }
domains: { 'example.net' => {} },
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/add_conf_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
let :default_params do
{ ensure: 'present',
filename: 'example.net.conf',
config_dir: '/etc/knot/conf.d' }
config_dir: '/etc/knot/conf.d', }
end

shared_examples 'knot::add_conf shared examples' do
Expand Down
6 changes: 3 additions & 3 deletions spec/defines/domain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
.with_rttl(0)
.with_rcontent("\"#{g}\"")
end
else # params[:ensure] != 'present'
else # params[:ensure] != 'present'
params[:zone_records].each do |r|
is_expected.not_to contain_knot_record("record #{r[:rname]}.#{params[:domain]} (#{i})")
end
Expand Down Expand Up @@ -179,7 +179,7 @@
zone_records: [{ rname: 'test', rcontent: '1.1.1.1' }, { rname: 'test', rtype: 'AAAA', rcontent: '::1' }],
zone_nameservers: ['ns1.example.org.', 'ns2.example.org.'],
zone_subzones: { 'sub' => { 'nameservers' => ['ns1.example.org'], 'trust_ds' => ['1 1 1 ttt'] } },
local_subzones: %w[blah fasel] })
local_subzones: %w[blah fasel], })
end

it_behaves_like 'knot::domain shared examples'
Expand All @@ -193,7 +193,7 @@
zone_records: [{ rname: 'verision', rtype: 'TXT', rcontent: '2' }],
zone_nameservers: ['ns1.example.org.'],
catalog_entries: { 'example.org' => 'secondary' },
catalog_salt: '42' })
catalog_salt: '42', })
end

it_behaves_like 'knot::domain shared examples'
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/records/caa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
.with_target_zone(params[:target_zone])
.with_rname(params[:rname])
.with_rttl(params[:ttl])
.with_rcontent("#{caa[:flags]} #{caa[:tag]} \"#{caa[:value]}\" ") # space at the end is needed !
.with_rcontent("#{caa[:flags]} #{caa[:tag]} \"#{caa[:value]}\" ") # space at the end is needed !
i += 1
end
}
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/records/mail_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
dkim_policy: 'dkim=all; t=s',
adsp_policy: 'o=-',
dmarc_policy: ['p=quarantine', 'adkim=s', 'aspf=s', 'ruf=mailto:dmarc@somewhere.org'],
dmarc_authorization: { 'target_zone' => 'somewhere.org', 'record' => 'v=DMARC1' }
dmarc_authorization: { 'target_zone' => 'somewhere.org', 'record' => 'v=DMARC1' },
)
end

Expand Down Expand Up @@ -273,7 +273,7 @@
dkim_policy: 'dkim=all; t=s',
adsp_policy: 'o=-',
dmarc_policy: ['p=quarantine', 'adkim=s', 'aspf=s', 'ruf=mailto:dmarc@somewhere.org'],
dmarc_authorization: { 'target_zone' => 'somewhere.org', 'record' => 'v=DMARC1' }
dmarc_authorization: { 'target_zone' => 'somewhere.org', 'record' => 'v=DMARC1' },
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/records/network_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
target_zone: 'example.org',
hostlist: { 'host' => { ipv4: '1.1.1.1', ipv6: '::1' } },
rev4_target_split: 1,
rev6_target_split: 21
rev6_target_split: 21,
)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/defines/records/srv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
target_zone: 'example.org',
srv: [{ priority: 10, weight: 10, target_port: 10, target: 'test.test.com' }],
service: [{ port: 111, proto: 'tcp' }],
rname: 'test'
rname: 'test',
)
end

Expand All @@ -72,7 +72,7 @@
target_zone: 'example.org',
srv: [{ priority: 10, weight: 10, target_port: 10, target: 'test.test.com' }],
service: [{ port: 111, proto: 'tcp' }],
rname: '.'
rname: '.',
)
end

Expand Down
4 changes: 2 additions & 2 deletions spec/defines/records/tlsa_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
target_zone: 'example.org',
tlsa: [{ usage: 3, selector: 1, matching: 1, value: 'abc34' }],
service: [{ port: 111, proto: 'tcp' }],
rname: 'test'
rname: 'test',
)
end

Expand All @@ -72,7 +72,7 @@
target_zone: 'example.org',
tlsa: [{ usage: 3, selector: 1, matching: 1, value: 'abc34' }],
service: [{ port: 111, proto: 'tcp' }],
rname: '.'
rname: '.',
)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/records/webserver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
ttl: 4242,
caa: [{ 'flags' => 0, 'tag' => 'issue', 'value' => 'letsencrypt.org' }],
tlsa: [{ 'usage' => 3, 'selector' => 1, 'matching' => 1, 'value' => 'abc34' }],
tlsa_service: [{ 'port' => 443, 'proto' => 'tcp' }]
tlsa_service: [{ 'port' => 443, 'proto' => 'tcp' }],
)
end

Expand Down
2 changes: 1 addition & 1 deletion types/subtypes/size.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# subtype: Number of bytes, an integer with a
# possible size multiplier suffix (B ~ 1, K ~ 1024, M ~ 1024^2 or G ~ 1024^3)
type Knot::Subtypes::Size = String[1]
type Knot::Subtypes::Size = Variant[String[1], Integer]
Loading