Sha256: f4e8b0f1c5192d39bccec44e1023dcd802e1db3b338d190b01cdc5a426665649

Contents?: true

Size: 1.16 KB

Versions: 17

Compression:

Stored size: 1.16 KB

Contents

Puppet::Face.define(:module, '1.0.0') do
  action(:changes) do
    summary "Show modified files of an installed module."
    description <<-EOT
      Shows any files in a module that have been modified since it was
      installed. This action compares the files on disk to the md5 checksums
      included in the module's metadata.
    EOT

    returns "Array of strings representing paths of modified files."

    examples <<-EOT
      Show modified files of an installed module:

      $ puppet module changes /etc/puppet/modules/vcsrepo/
      warning: 1 files modified
      lib/puppet/provider/vcsrepo.rb
    EOT

    arguments "<path>"

    when_invoked do |path, options|
      Puppet::ModuleTool.set_option_defaults options
      root_path = Puppet::ModuleTool.find_module_root(path)
      Puppet::ModuleTool::Applications::Checksummer.run(root_path, options)
    end

    when_rendering :console do |return_value|
      if return_value.empty?
        Puppet.notice "No modified files"
      else
        Puppet.warning "#{return_value.size} files modified"
      end
      return_value.map do |changed_file|
        "#{changed_file}"
      end.join("\n")
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/lib/puppet/face/module/changes.rb
puppet-3.1.1 lib/puppet/face/module/changes.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/puppet-3.1.0/lib/puppet/face/module/changes.rb
puppet-3.1.0 lib/puppet/face/module/changes.rb
puppet-3.1.0.rc2 lib/puppet/face/module/changes.rb
puppet-3.1.0.rc1 lib/puppet/face/module/changes.rb
puppet-3.0.2 lib/puppet/face/module/changes.rb
puppet-3.0.2.rc3 lib/puppet/face/module/changes.rb
puppet-3.0.2.rc2 lib/puppet/face/module/changes.rb
puppet-3.0.2.rc1 lib/puppet/face/module/changes.rb
puppet-3.0.1 lib/puppet/face/module/changes.rb
puppet-3.0.1.rc1 lib/puppet/face/module/changes.rb
puppet-3.0.0 lib/puppet/face/module/changes.rb
puppet-3.0.0.rc8 lib/puppet/face/module/changes.rb
puppet-3.0.0.rc7 lib/puppet/face/module/changes.rb
puppet-3.0.0.rc5 lib/puppet/face/module/changes.rb
puppet-3.0.0.rc4 lib/puppet/face/module/changes.rb