Browse Source

Add Gemfile and puppet 4 checks

In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix arrow
alignment errors now caught by the bundle-installed puppet-lint.

Change-Id: I4a6d4a6ecfc9812145867362eb06228de0c840bc
Colleen Murphy 3 years ago
parent
commit
944afc1acd
3 changed files with 40 additions and 8 deletions
  1. 2
    0
      .gitignore
  2. 30
    0
      Gemfile
  3. 8
    8
      manifests/init.pp

+ 2
- 0
.gitignore View File

@@ -0,0 +1,2 @@
1
+Gemfile.lock
2
+.bundled_gems/

+ 30
- 0
Gemfile View File

@@ -0,0 +1,30 @@
1
+source 'https://rubygems.org'
2
+
3
+group :development, :test do
4
+  gem 'puppetlabs_spec_helper', :require => false
5
+
6
+  gem 'metadata-json-lint'
7
+  # This is nice and all, but let's not worry about it until we've actually
8
+  # got puppet 4.x sorted
9
+  # gem 'puppet-lint-param-docs'
10
+  gem 'puppet-lint-absolute_classname-check'
11
+  gem 'puppet-lint-absolute_template_path'
12
+  gem 'puppet-lint-trailing_newline-check'
13
+
14
+  # Puppet 4.x related lint checks
15
+  gem 'puppet-lint-unquoted_string-check'
16
+  gem 'puppet-lint-empty_string-check'
17
+  gem 'puppet-lint-leading_zero-check'
18
+  gem 'puppet-lint-variable_contains_upcase'
19
+  gem 'puppet-lint-spaceship_operator_without_tag-check'
20
+  gem 'puppet-lint-undef_in_function-check'
21
+
22
+  if puppetversion = ENV['PUPPET_GEM_VERSION']
23
+    gem 'puppet', puppetversion, :require => false
24
+  else
25
+    gem 'puppet', '~> 3.0', :require => false
26
+  end
27
+
28
+end
29
+
30
+# vim:ft=ruby

+ 8
- 8
manifests/init.pp View File

@@ -25,10 +25,10 @@ class unbound (
25 25
     # This file differs from that in the package only by setting
26 26
     # RESOLVCONF_FORWARDERS to false.
27 27
     file { '/etc/default/unbound':
28
-      source  => 'puppet:///modules/unbound/unbound.default',
29
-      owner   => 'root',
30
-      group   => 'root',
31
-      mode    => '0444',
28
+      source => 'puppet:///modules/unbound/unbound.default',
29
+      owner  => 'root',
30
+      group  => 'root',
31
+      mode   => '0444',
32 32
     }
33 33
 
34 34
     # We require the defaults file be in place before installing the
@@ -43,10 +43,10 @@ class unbound (
43 43
 
44 44
     # Tripleo uses dhcp
45 45
     file { '/etc/dhcp/dhclient.conf':
46
-      source  => 'puppet:///modules/unbound/dhclient.conf.debian',
47
-      owner   => 'root',
48
-      group   => 'root',
49
-      mode    => '0444',
46
+      source => 'puppet:///modules/unbound/dhclient.conf.debian',
47
+      owner  => 'root',
48
+      group  => 'root',
49
+      mode   => '0444',
50 50
     }
51 51
   }
52 52
 

Loading…
Cancel
Save