Jira (PUP-6977) Add a module_directory function that returns a module's directory path

0 views
Skip to first unread message

Henrik Lindberg (JIRA)

unread,
Feb 1, 2018, 4:29:02 AM2/1/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
 
Puppet / New Feature PUP-6977
Add a module_directory function that returns a module's directory path
Change By: Henrik Lindberg
Summary: Add a  find_module  module_directory  function that returns a module's directory path
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Henrik Lindberg (JIRA)

unread,
Feb 1, 2018, 4:30:03 AM2/1/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Change By: Henrik Lindberg
Release Notes Summary: The function {{ find_module module_directory }} has been added - it finds a module by name and returns the file system path to its root directory, or {{undef}} if module is not found on the modulepath.

Henrik Lindberg (JIRA)

unread,
Feb 1, 2018, 4:30:03 AM2/1/18
to puppe...@googlegroups.com
Henrik Lindberg updated an issue
Add a function {{ find_module module_directory (names)}} that returns the path of the first found module on the module path, or undef if none of the given names is a module on the modulepath.

ORIGINAL
----
It would be very useful for calling generator scripts in the files directory of the current module if the path to the current module (in particular which of the entries in module_path is currently used) would be supplied as a compiler variable similar to module_name.

Currently it is only possible to hard-code that component of the path as far as I can tell, e.g.

{code}
${settings::environmentpath}/${environment}/modules/module_name/files/gen_script.sh
{code}

This works fine for most cases but we are currently using several folders in the environment.conf's module_path, one for local modules that abstract away stuff for specific hosts, one for shared modules between different customer's puppet masters and our own and now one for shared modules between our old and new environments (rewrite of our internal modules to support multiple Linux distributions and follow more best practices but not all hosts are migrated to it yet).

John Duarte (JIRA)

unread,
Oct 21, 2019, 10:47:03 AM10/21/19
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
QA Risk Assessment: Needs Assessment No Action
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages