Product SiteDocumentation Site

9.8. FAQ

Frequently asked questions
What's the use of symlink_prefix?
Getting back to the example usage of git::repository:
node 'node1.example.org' {
    git::repository { "git.puppetmanaged.org-webserver":
        symlink_prefix => "puppet-module",
        real_name => "webserver",
        public => true,
        shared => true,
        group => "contributors",
        localtree => "/data/scm/git/git.puppetmanaged.org/",
        recipients => [ "contributors@example.org" ]
    }
}
The symlink_prefix causes a symbolic link to be created in /git/, named puppet-module-webserver. The symbolic link looks like this:
/git/puppet-module-webserver => /data/scm/git/git.puppetmanaged.org/webserver/
This creates the opportunity to create another GIT repository named webserver in a different path:
node 'node1.example.org' {
    git::repository { "git.school.org-webserver":
        symlink_prefix => "school-project",
        real_name => "webserver",
        public => false,
        shared => true,
        group => "students",
        localtree => "/data/scm/git/git.school.org/",
        recipients => [ "students@example.org" ]
    }
}
Because puppet allows the instantation of a type only once, you cannot create multiple Git::Repository["webserver"] resources. Use the real_name attribute to git::repository to set the repository's real name (e.g. webserver).
What's the use of the prefix attribute?
When defining multiple GIT repositories, such as for domain specific configuration trees, or when using the git::repository::domain type, the prefix attribute helps because the title of the resource is used in several places, while the prefix enables distinction between, say, git repositories for modules and git repositories for domain specific configuration trees.
Can I combine the symlink_prefix and prefix attributes?
Yes you can. Note however that the $prefix yada yada
Question?
Answer