Module: Yutani

Defined in:
lib/yutani.rb,
lib/yutani/cli.rb,
lib/yutani/mod.rb,
lib/yutani/hiera.rb,
lib/yutani/stack.rb,
lib/yutani/utils.rb,
lib/yutani/config.rb,
lib/yutani/version.rb,
lib/yutani/provider.rb,
lib/yutani/resource.rb,
lib/yutani/reference.rb,
lib/yutani/dsl_entity.rb,
lib/yutani/directory_tree.rb

Defined Under Namespace

Modules: Hiera, Utils Classes: Cli, Config, DSLEntity, DirectoryTree, Mod, Provider, Reference, Resource, ResourceAttribute, Stack, SubResource

Constant Summary collapse

VERSION =
'0.0.5'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.entry_pathObject

Returns the value of attribute entry_path.



22
23
24
# File 'lib/yutani.rb', line 22

def entry_path
  @entry_path
end

.hieraObject

Returns the value of attribute hiera.



22
23
24
# File 'lib/yutani.rb', line 22

def hiera
  @hiera
end

.loggerObject

Returns the value of attribute logger.



22
23
24
# File 'lib/yutani.rb', line 22

def logger
  @logger
end

.stacksObject

Returns the value of attribute stacks.



22
23
24
# File 'lib/yutani.rb', line 22

def stacks
  @stacks
end

Class Method Details

.build_from_file(file) ⇒ Object



50
51
52
53
54
55
56
57
58
# File 'lib/yutani.rb', line 50

def build_from_file(file)
  Yutani.entry_path = file

  instance_eval(File.read(file), file)

  unless stacks.empty?
    stacks.each {|s| s.to_fs}
  end
end

.config(override = {}) ⇒ Object



40
41
42
43
44
45
46
47
48
# File 'lib/yutani.rb', line 40

def config(override = {})
  config = Config.new
  override = Config[override]

  config = config.read_config_file

  # Merge DEFAULTS < .yutani.yml < override
  Config.from(config.merge(override))
end

.stack(name, **scope, &block) ⇒ Object



34
35
36
37
38
# File 'lib/yutani.rb', line 34

def stack(name, **scope, &block)
  s = Stack.new(name, **scope, &block)
  @stacks << s
  s
end