Module: Ronin

Defined in:
lib/ronin/version.rb,
lib/ronin/git.rb,
lib/ronin/log.rb,
lib/ronin/chef.rb,
lib/ronin/ronin.rb,
lib/ronin/config.rb,
lib/ronin/puppet.rb,
lib/ronin/run_list.rb,
lib/ronin/module_runner.rb

Overview

Author

Nathan Milford (<[email protected]>)

Copyright

Copyright © 2013 Nathan Milford

License

Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: Chef, Git, Puppet Classes: Config, Log, ModuleRunner, RunList

Constant Summary collapse

VERSION =
'0.0.8'

Class Method Summary collapse

Class Method Details

.runObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ronin/ronin.rb', line 22

def run

  unless Process.uid == 0
    puts 'You need to be root to perform this command.'
    exit 1
  end

  Ronin::Log.level = Ronin::Config[:log_level]

  @r = Ronin::ModuleRunner.new
  @changes = @r.download_and_report_changes
  @r.purge_unused

  if @changes
    if Ronin::Config[:interpreter] = :puppet
      Ronin::Puppet.run
    elsif Ronin::Config[:interpreter] = :chef
      Ronin::Chef.run
    end
  end
end