Method: Puppet::Module#task_file
- Defined in:
- lib/puppet/module.rb
#task_file(name) ⇒ Object
This is a re-implementation of the Filetypes singular type method (e.g. ‘manifest(’my/manifest.pp’)‘. We don’t implement the full filetype “API” for tasks since tasks don’t map 1:1 onto files.
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/puppet/module.rb', line 182 def task_file(name) # If 'file' is nil then they're asking for the base path. # This is used for things like fileserving. if name full_path = File.join(tasks_directory, name) else full_path = tasks_directory end if Puppet::FileSystem.exist?(full_path) return full_path else return nil end end |