Skip to content

Commit

Permalink
Make all puppetfile cli actions accept puppetfile name
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Heinzmann authored and scotje committed Dec 16, 2016
1 parent 49b8b06 commit 2678d55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/r10k/action/puppetfile/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Puppetfile
class Check < R10K::Action::Base

def call
pf = R10K::Puppetfile.new(@root, @moduledir, @path)
pf = R10K::Puppetfile.new(@root, @moduledir, @puppetfile)
begin
pf.load!
$stderr.puts _("Syntax OK")
Expand Down
2 changes: 1 addition & 1 deletion lib/r10k/action/puppetfile/purge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Puppetfile
class Purge < R10K::Action::Base

def call
pf = R10K::Puppetfile.new(@root, @moduledir, @path)
pf = R10K::Puppetfile.new(@root, @moduledir, @puppetfile)
pf.load!
pf.purge!
true
Expand Down
4 changes: 4 additions & 0 deletions lib/r10k/cli/puppetfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def self.command
name 'check'
usage 'check'
summary 'Try and load the Puppetfile to verify the syntax is correct.'

required nil, :puppetfile, 'Path to puppetfile'
runner R10K::Action::Puppetfile::CriRunner.wrap(R10K::Action::Puppetfile::Check)
end
end
Expand All @@ -57,6 +59,8 @@ def self.command
usage 'purge'
summary 'Purge unmanaged modules from a Puppetfile managed directory'

required nil, :moduledir, 'Path to install modules to'
required nil, :puppetfile, 'Path to puppetfile'
runner R10K::Action::Puppetfile::CriRunner.wrap(R10K::Action::Puppetfile::Purge)
end
end
Expand Down

0 comments on commit 2678d55

Please sign in to comment.