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.
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/puppet/module.rb', line 159 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 |