Class: R10K::Task::Environment::Deploy Deprecated

Inherits:
Base
  • Object
show all
Defined in:
lib/r10k/task/environment.rb

Overview

Deprecated.

Constant Summary

Constants included from Logging

Logging::LOG_LEVELS

Instance Attribute Summary collapse

Attributes inherited from Base

#task_runner

Instance Method Summary collapse

Methods included from Logging

formatter, included, level, level=, levels, #logger, #logger_name, outputter, parse_level

Constructor Details

#initialize(environment) ⇒ Deploy

Returns a new instance of Deploy.



13
14
15
16
17
# File 'lib/r10k/task/environment.rb', line 13

def initialize(environment)
  @environment = environment

  @update_puppetfile = false
end

Instance Attribute Details

#update_puppetfile=(value) ⇒ Object (writeonly)

Sets the attribute update_puppetfile

Parameters:

  • value

    the value to set the attribute update_puppetfile to.



11
12
13
# File 'lib/r10k/task/environment.rb', line 11

def update_puppetfile=(value)
  @update_puppetfile = value
end

Instance Method Details

#callObject



19
20
21
22
23
24
25
26
27
# File 'lib/r10k/task/environment.rb', line 19

def call
  logger.notice "Deploying environment #{@environment.dirname}"
  @environment.sync

  if @update_puppetfile
    task = R10K::Task::Puppetfile::Sync.new(@environment.puppetfile)
    task_runner.insert_task_after(self, task)
  end
end