Sha256: f5226dcab2527da26d036783e7ae98e5520a3831250311fe11132db4813491a3

Contents?: true

Size: 746 Bytes

Versions: 11

Compression:

Stored size: 746 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/subspace/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/subspace/group_vars/#{group}"
    template "group_vars/template", "group_vars/#{group}", Subspace.config.binding_for(group: group)
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
subspace-3.0.12 lib/subspace/commands/configure.rb
subspace-3.0.11 lib/subspace/commands/configure.rb
subspace-3.0.10 lib/subspace/commands/configure.rb
subspace-3.0.9 lib/subspace/commands/configure.rb
subspace-3.0.6 lib/subspace/commands/configure.rb
subspace-3.0.5 lib/subspace/commands/configure.rb
subspace-3.0.4 lib/subspace/commands/configure.rb
subspace-3.0.3 lib/subspace/commands/configure.rb
subspace-3.0.2 lib/subspace/commands/configure.rb
subspace-3.0.0 lib/subspace/commands/configure.rb
subspace-3.0.0.rc1 lib/subspace/commands/configure.rb