Class: Bolt::Task::PuppetServer
- Inherits:
-
Bolt::Task
- Object
- Bolt::Task
- Bolt::Task::PuppetServer
- Defined in:
- lib/bolt/task/puppet_server.rb
Constant Summary
Constants inherited from Bolt::Task
ENVIRONMENT_METHODS, METADATA_KEYS, STDIN_METHODS
Instance Attribute Summary
Attributes inherited from Bolt::Task
#files, #metadata, #mtime, #name, #remote
Instance Method Summary collapse
- #file_path(file_name) ⇒ Object
-
#initialize(name, metadata, files, file_cache, remote = false) ⇒ PuppetServer
constructor
A new instance of PuppetServer.
- #remote_instance ⇒ Object
-
#update_file_data ⇒ Object
puppetserver file entries have ‘filename’ rather then ‘name’.
Methods inherited from Bolt::Task
#add_mtimes, #description, #eql?, from_task_signature, #implementations, #module_name, #parameter_defaults, #parameters, #select_implementation, #supports_noop, #tasks_dir, #to_h, #validate_metadata
Constructor Details
#initialize(name, metadata, files, file_cache, remote = false) ⇒ PuppetServer
Returns a new instance of PuppetServer.
10 11 12 13 14 |
# File 'lib/bolt/task/puppet_server.rb', line 10 def initialize(name, , files, file_cache, remote = false) super(name, , files, remote) @file_cache = file_cache update_file_data end |
Instance Method Details
#file_path(file_name) ⇒ Object
21 22 23 24 |
# File 'lib/bolt/task/puppet_server.rb', line 21 def file_path(file_name) file = file_map[file_name] file['path'] ||= @file_cache.update_file(file) end |
#remote_instance ⇒ Object
6 7 8 |
# File 'lib/bolt/task/puppet_server.rb', line 6 def remote_instance self.class.new(@name, @metadata, @files, @file_cache, true) end |
#update_file_data ⇒ Object
puppetserver file entries have ‘filename’ rather then ‘name’
17 18 19 |
# File 'lib/bolt/task/puppet_server.rb', line 17 def update_file_data @files.each { |f| f['name'] = f['filename'] } end |