Merge pull request #135 from myii/chore/standardise-structure

feat(yamllint): include for this repo and apply rules throughout
This commit is contained in:
Niels Abspoel 2019-08-17 09:50:03 +02:00 committed by GitHub
commit d23c01f737
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 93 additions and 59 deletions

View file

@ -3,7 +3,7 @@
---
stages:
- test
- commitlint
- lint
- name: release
if: branch = master AND type != pull_request
@ -45,16 +45,21 @@ script:
jobs:
include:
# Define the commitlint stage
- stage: commitlint
# Define the `lint` stage (runs `yamllint` and `commitlint`)
- stage: lint
language: node_js
node_js: lts/*
before_install: skip
script:
# Install and run `yamllint`
- pip install --user yamllint
# yamllint disable-line rule:line-length
- yamllint -s . .yamllint pillar.example test/salt/pillar/default.sls
# Install and run `commitlint`
- npm install @commitlint/config-conventional -D
- npm install @commitlint/travis-cli -D
- commitlint-travis
# Define the release stage that runs semantic-release
# Define the release stage that runs `semantic-release`
- stage: release
language: node_js
node_js: lts/*

24
.yamllint Normal file
View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Extend the `default` configuration provided by `yamllint`
extends: default
# Files to ignore completely
# 1. All YAML files under directory `node_modules/`, introduced during the Travis run
ignore: |
node_modules/
rules:
comments-indentation:
ignore: |
pillar.example
key-duplicates:
ignore: |
pillar.example
line-length:
ignore: |
pillar.example
# Increase from default of `80`
# Based on https://github.com/PyCQA/flake8-bugbear#opinionated-warnings (`B950`)
max: 88

View file

@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
# Note - Each section beginning with 'bind:' below represents a different way you may configure
pillars for bind. When configuring your pillar(s), you may use any combination of subsections,
but salt will not merge sections with the same heading.
# pillars for bind. When configuring your pillar(s), you may use any combination of subsections,
# but salt will not merge sections with the same heading.
### Overrides for the defaults specified by ###
@ -35,33 +38,33 @@ bind:
file: default
size: '200m' # size of a individual file (default 20m)
versions: '10' # how many files will be stored (default 3)
print-time: yes
print-category: yes
print-severity: yes
print-time: true
print-category: true
print-severity: true
severity: info
queries_log:
file: queries
print-time: yes
print-category: yes
print-severity: yes
print-time: true
print-category: true
print-severity: true
severity: info
query-errors_log:
file: query-errors
print-time: yes
print-category: yes
print-severity: yes
print-time: true
print-category: true
print-severity: true
severity: dynamic
default_syslog:
print-time: yes
print-category: yes
print-severity: yes
print-time: true
print-category: true
print-severity: true
syslog: daemon
severity: info
default_debug:
file: named.run
print-time: yes
print-category: yes
print-severity: yes
print-time: true
print-category: true
print-severity: true
severity: info
category:
default:
@ -100,8 +103,8 @@ bind:
# binds default of both.
# Debian and FreeBSD based systems
default_zones: True # If set to True, the default-zones configuration
# will be enabled. Defaults to False.
default_zones: true # If set to true, the default-zones configuration
# will be enabled. Defaults to false.
includes: # Include any additional configuration file(s) in
- /some/additional/named.conf # named.conf
@ -169,12 +172,12 @@ bind:
file: sub.domain.com # You can optionally specify name of a file here.
type: master # Yo don't have define zone again in available_zones.
# This feature is backward compatibile and only available in debian
notify: False # if type master you need specify notify True/False
notify: false # if type master you need specify notify true/false
sub2.domain.com:
file: sub2.domain.com
type: master
notify: True
notify: true
allow-query:
- any
allow-transfer:
@ -183,18 +186,18 @@ bind:
also-notify:
- 1.2.3.4
- 1.2.3.3
zone-statistics: yes # Enable detailed statistics for zone. You need enable statistics first
zone-statistics: true # Enable detailed statistics for zone. You need enable statistics first
test.zone.com:
file: test.zone.com
type: slave
notify: False
notify: false
masters:
- my_dns_masters # You can specify masters by using name
test.zone2.com: # Zone definied in default style of this formula
type: slave # You need specify all info inside available_zones
notify: False
notify: false
configured_masters: # Configure master dns
@ -215,8 +218,7 @@ bind:
# on SUSE include the forwarders.conf file generated by netconfig(8)
bind:
config:
include_forwarders: True
include_forwarders: true
### Keys, Zones, ACLs and Views ###
@ -228,7 +230,7 @@ bind:
configured_zones:
sub.domain.com: # First domain zone
type: master # We're the master of this zone
notify: False # Don't notify any NS RRs of any changes to zone
notify: false # Don't notify any NS RRs of any changes to zone
also-notify: # Do notify these IP addresses (pointless as
- 1.1.1.1 # notify has been set to no)
- 2.2.2.2 # If using views, do not define configured_zones
@ -237,20 +239,20 @@ bind:
sub.domain2.com: # Domain zone with DNSSEC
type: master # We're the master of this zone
notify: False # Don't notify any NS RRs of any changes to zone
dnssec: True # Create and manage signed zonefile with zonesigner
notify: false # Don't notify any NS RRs of any changes to zone
dnssec: true # Create and manage signed zonefile with zonesigner
# You will have to install dnssec-tools by hand
# on many distributions
sub.domain3.com: # Domain zone with DNSSEC
type: master # We're the master of this zone
notify: False # Don't notify any NS RRs of any changes to zone
notify: false # Don't notify any NS RRs of any changes to zone
auto-dnssec: 'maintain' # Bind will create and manage the signed zonefile
# itself, we only have to provide the clear zone
1.168.192.in-addr.arpa: # Reverse lookup for local IPs
type: master # As above
notify: False # As above
notify: false # As above
allow-transfer: # As above
- 1.1.1.1
- 2.2.2.2
@ -258,7 +260,7 @@ bind:
dynamic.domain.com: # Our ddns zone
type: master # As above
allow-update: "key core_dhcp" # Who we allow updates from (refers to above key)
notify: True # Notify NS RRs of changes
notify: true # Notify NS RRs of changes
sub.anotherdomain.com: # Another domain zone
type: forward # This time it's a forwarding zone
@ -290,7 +292,7 @@ bind:
# serve a different record set in each.
# If doing this, you need to configure the zones and their record sets
# underneath the 'available_zones' section.
notify: False
notify: false
update_policy: # A given update policy
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
@ -341,8 +343,6 @@ bind:
_dmarc: '"v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; fo=1:d:s; adkim=r; aspf=r; pct=100; ri=86400"'
3.2.1.in-addr.arpa: # auto-generated reverse zone
file: example.com.rev.txt
soa: # Declare the SOA RRs for the zone

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
name: default
title: bind formula
maintainer: SaltStack Formulas

View file

@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
bind:
configured_acls:
client1:
@ -8,15 +11,15 @@ bind:
configured_zones:
example.com:
type: master
notify: False
notify: false
update_policy:
- "grant core_dhcp name dns_entry_allowed_to_update. ANY"
example.net:
type: master
notify: False
notify: false
example.org:
type: slave
notify: False
notify: false
masters:
- 192.0.2.1
- 192.0.2.2
@ -25,7 +28,7 @@ bind:
notify: false
100.51.198.in-addr.arpa:
type: master
notify: False
notify: false
available_zones:
example.net:
file: example.net
@ -111,4 +114,3 @@ bind:
net: 198.51.100.0/24
for_zones:
- example.net