Ask Your Question

Why does r10k remove git- from my module name?

asked 2015-04-02 15:41:11 -0600

rashwinkumar gravatar image

updated 2015-04-02 18:24:01 -0600

csharpsteen gravatar image

I have R10k. In a Puppetfile, I have module called git-apache. For some reason, when I do a r10k deploy, it deploys the module as module name "apache" and not git-apache. Not sure why r10k doesnt like git- or any other hypen named modules.

Any suggestions?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-02 18:28:50 -0600

csharpsteen gravatar image

updated 2015-04-02 18:34:45 -0600

Currently, hyphens are not allowed in module names. From the Modules Fundamentals docs:

Module names should only contain lowercase letters, numbers, and underscores, and should begin with a lowercase letter; that is, they should match the expression [a-z][a-z0-9_]*. Note that these are the same restrictions that apply to class names, but with the added restriction that module names cannot contain the namespace separator (::) as modules cannot be nested.

There are two reasons for this restriction:

  • The module name is used as the top-level namespace for all classes and defined types included with the module:

    # manifests/init.pp
    class <module name> {
    # manifests/some_type.pp
    define <module name>::some_type {

    Hyphens are not valid characters for namespace segments, so <module name> can't include hyphens.

  • The module tool uses the hyphen, -, and forward slash, /, characters to separate the Forge username of the module author from the module name. This means that the module tool, and r10k, interpret the string git-apache as a module named apache authored by the Forge user git.

The underscore is commonly used as a substitute for hyphens: git_apache

edit flag offensive delete link more


Thanks ...I had little doubt since r10k 1.3.2 allowed hyphens in the modules names .Probably that was fixed with versions which came later right ?.I have 1.4.1

rashwinkumar gravatar imagerashwinkumar ( 2015-04-03 12:14:39 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2015-04-02 15:41:11 -0600

Seen: 361 times

Last updated: Apr 02 '15