Sha256: 2a7e0e0c49470d0a18e9efa8626c4d8533c948f875be35b576afe9b89025a500

Contents?: true

Size: 750 Bytes

Versions: 60

Compression:

Stored size: 750 Bytes

Contents

class Subspace::Commands::Configure < Subspace::Commands::Base
  def initialize(args, options)
    require_configuration
    run
  end

  def run
    Subspace.config.hosts.each do |host|
      update_host_configuration(host)
    end
    Subspace.config.groups.each do |group|
      update_group_configuration(group)
    end
  end

  private

  def update_host_configuration(host)
    say "Generating config/provisiong/host_vars/#{host}"
    template "host_vars/template", "host_vars/#{host}", Subspace.config.binding_for(host: host)
  end

  def update_group_configuration(group)
    say "Generating config/provisiong/group_vars/#{group}"
    template "group_vars/template", "group_vars/#{group}", Subspace.config.binding_for(group: group)
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
subspace-0.6.16 lib/subspace/commands/configure.rb
subspace-0.6.15 lib/subspace/commands/configure.rb
subspace-0.5.15 lib/subspace/commands/configure.rb
subspace-0.5.14 lib/subspace/commands/configure.rb
subspace-0.4.14 lib/subspace/commands/configure.rb
subspace-0.4.13 lib/subspace/commands/configure.rb
subspace-0.4.11 lib/subspace/commands/configure.rb
subspace-0.4.10 lib/subspace/commands/configure.rb
subspace-0.4.9 lib/subspace/commands/configure.rb
subspace-0.4.8 lib/subspace/commands/configure.rb
subspace-0.4.7 lib/subspace/commands/configure.rb
subspace-0.4.6 lib/subspace/commands/configure.rb
subspace-0.4.5 lib/subspace/commands/configure.rb
subspace-0.4.4 lib/subspace/commands/configure.rb
subspace-0.4.3 lib/subspace/commands/configure.rb
subspace-0.4.2 lib/subspace/commands/configure.rb
subspace-0.4.1 lib/subspace/commands/configure.rb
subspace-0.4.0 lib/subspace/commands/configure.rb
subspace-0.3.0 lib/subspace/commands/configure.rb
subspace-0.2.1 lib/subspace/commands/configure.rb