Sha256: 72d98f55f0b71170df297bbbcc564b824a6ef149ff6e9e46f3efa89a8bc4850f

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

require 'rbconfig'

class GepettoGenerator < RubiGen::Base

  def initialize(runtime_args, runtime_options = {})
    super

    usage if args.empty?
    @destination_root = File.expand_path(args.shift)
  end

  def manifest
    script_options = { :chmod => 0755 }
    
    record do |m|
      # Root directory and all subdirectories.
      m.directory ''

      %w{script config manifests manifests/classes files templates log tasks}.each { |path| m.directory path }

      m.template_copy_each %w( Rakefile )

      m.template_copy_each %w( defaults.pp site.pp templates.pp nodes.pp ), 'manifests'

      m.template_copy_each %w( defaults.pp site.pp templates.pp nodes.pp ), 'manifests'

      m.template_copy_each %w( sandbox.pp sandbox-sample.pp ), 'manifests'

      m.template_copy_each %w( empty.pp ), 'manifests/classes'

      m.template_copy_each %w( puppet.conf fileserver.conf ), 'config'
      m.template_copy_each %w( qemu-ifup ), 'config', script_options

      m.template_copy_each %w( puppetmasterd puppetca puppetrun module ), 'script', script_options

      m.dependency "install_rubigen_scripts", [destination_root, "puppet"]
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gepetto-0.0.12 app_generators/gepetto/gepetto_generator.rb
gepetto-0.0.11 app_generators/gepetto/gepetto_generator.rb