kitchen-puppet 1.40.2 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a52a9b68db3301a65d7801ce0ccc5b96d3a9243
4
- data.tar.gz: 363c6d58945981575f34e78714decce33cccf65e
3
+ metadata.gz: a4dbe4234aae9408764bb74e4f92d5e46af49c2c
4
+ data.tar.gz: 1d15df9eaf3229a394ca3aef95fe78c99f041ec1
5
5
  SHA512:
6
- metadata.gz: 17ae32e249492274b0f6e7de9a7530f62aa8b6d4a09249c4051c3aae098dd28a4a9b5fad460a857ca0db4ae0d8510123071fdbfb9d59976dc415907a861dcc55
7
- data.tar.gz: c01e08ef9578ee06d60ae6cbd6da376ac62ef9d778cf6316575ee54778ac0ecdc5d5d7f4f92e12c30f4b628d965e69a4e84082360dfeb4242c474599c2e69335
6
+ metadata.gz: ef9fff2416a9f99c4f71f1844c29f69081015a14581a74989f8a40dd4ddfbaf4aa8feb57a484c3c563bcc5e6779851ac3e8749de93863bb937f93fe7f213c5e2
7
+ data.tar.gz: 4c36673caf5d02a2269d43eb7af94726d3dfb17b8fef03c7c5062f5f2dfef43d0f7925eecc1d1495278865414043817cf5dd2494ce54cd73fc5d30215e779df6
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Kitchen
4
4
  module Puppet
5
- VERSION = '1.40.2'.freeze
5
+ VERSION = '1.41.0'.freeze
6
6
  end
7
7
  end
@@ -44,7 +44,9 @@ module Kitchen
44
44
  debug("Using Puppetfile from #{puppetfile}")
45
45
 
46
46
  env = ::Librarian::Puppet::Environment.new(
47
- project_path: File.dirname(puppetfile))
47
+ project_path: File.dirname(puppetfile)
48
+ )
49
+
48
50
  env.config_db.local['path'] = path
49
51
  ::Librarian::Action::Resolve.new(env).run
50
52
  ::Librarian::Action::Install.new(env).run
@@ -77,6 +77,7 @@ module Kitchen
77
77
  default_config :http_proxy, nil
78
78
  default_config :https_proxy, nil
79
79
 
80
+ default_config :ignored_paths_from_root, []
80
81
  default_config :hiera_data_remote_path, '/var/lib/hiera'
81
82
  default_config :manifest, 'site.pp'
82
83
 
@@ -155,6 +156,7 @@ module Kitchen
155
156
  end
156
157
 
157
158
  default_config :hiera_deep_merge, false
159
+ default_config :puppet_no_sudo, false
158
160
 
159
161
  def calculate_path(path, type = :directory)
160
162
  base = config[:test_base_path]
@@ -466,18 +468,21 @@ module Kitchen
466
468
  end
467
469
 
468
470
  if puppet_git_pr
469
- commands << [sudo('git'),
470
- '--git-dir=/etc/puppet/.git/',
471
- 'fetch -f',
472
- 'origin',
473
- "pull/#{puppet_git_pr}/head:pr_#{puppet_git_pr}"
474
- ].join(' ')
475
-
476
- commands << [sudo('git'), '--git-dir=/etc/puppet/.git/',
477
- '--work-tree=/etc/puppet/',
478
- 'checkout',
479
- "pr_#{puppet_git_pr}"
480
- ].join(' ')
471
+ commands << [
472
+ sudo('git'),
473
+ '--git-dir=/etc/puppet/.git/',
474
+ 'fetch -f',
475
+ 'origin',
476
+ "pull/#{puppet_git_pr}/head:pr_#{puppet_git_pr}"
477
+ ].join(' ')
478
+
479
+ commands << [
480
+ sudo('git'),
481
+ '--git-dir=/etc/puppet/.git/',
482
+ '--work-tree=/etc/puppet/',
483
+ 'checkout',
484
+ "pr_#{puppet_git_pr}"
485
+ ].join(' ')
481
486
  end
482
487
 
483
488
  if puppet_config
@@ -678,10 +683,15 @@ module Kitchen
678
683
  end
679
684
 
680
685
  def puppet_cmd
686
+ puppet_bin = 'puppet'
681
687
  if config[:require_puppet_collections]
682
- sudo_env("#{config[:puppet_coll_remote_path]}/bin/puppet")
688
+ puppet_bin = "#{config[:puppet_coll_remote_path]}/bin/puppet"
689
+ end
690
+
691
+ if config[:puppet_no_sudo]
692
+ puppet_bin
683
693
  else
684
- sudo_env('puppet')
694
+ sudo_env(puppet_bin)
685
695
  end
686
696
  end
687
697
 
@@ -1006,8 +1016,11 @@ module Kitchen
1006
1016
  return unless module_name
1007
1017
  module_target_path = File.join(sandbox_path, 'modules', module_name)
1008
1018
  FileUtils.mkdir_p(module_target_path)
1019
+
1020
+ excluded_paths = %w(modules spec pkg) + config[:ignored_paths_from_root]
1021
+
1009
1022
  FileUtils.cp_r(
1010
- Dir.glob(File.join(config[:kitchen_root], '*')).reject { |entry| entry =~ /modules$|spec$|pkg$/ },
1023
+ Dir.glob(File.join(config[:kitchen_root], '*')).reject { |entry| entry =~ /#{excluded_paths.join('$|')}$/ },
1011
1024
  module_target_path,
1012
1025
  remove_destination: true
1013
1026
  )
@@ -61,6 +61,8 @@ require_puppet_omnibus | false | Set if using omnibus puppet install
61
61
  puppet_omnibus_url | https://raw.githubusercontent.com/ petems/puppet-install-shell/ master/install_puppet.sh | omnibus puppet v3 install location.
62
62
  _for puppet v4 change to_ | https://raw.githubusercontent.com/ petems/puppet-install-shell/ master/install_puppet_agent.sh |
63
63
  puppet_enc | | path for external node classifier script
64
+ puppet_no_sudo | false | allow puppet command to run without sudo if required
65
+ ignored_paths_from_root | [] | allow extra paths to be ignored when copying from puppet repository
64
66
 
65
67
  ## Puppet Apply Configuring Provisioner Options
66
68
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.40.2
4
+ version: 1.41.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-04 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen