Search code examples
rubyfilepuppet

Puppet not handling squared brackets in the source attribute for file resource


I am still facing this issue, when trying to copy git installation files by copying a folder and making it recursive. There is a file called [.exe and it is failing with:

Error: /Stage[main]/Tcagents/File[Copy Team City agent tools]: Failed to generate additional resources using 'eval_generate': Parameter source failed on File[D:/TeamCityTools/git-2.5.0/usr/bin/[.exe]: Could not understand source puppet:///tools/TeamCityTools/git-2.5.0/usr/bin/[.exe: bad URI(is not URI?): puppet:///tools/TeamCityTools/git-2.5.0/usr/bin/[.exe`

While reading other requests, I saw that is is due to the URI library Puppet uses for validating the path. I also found the same issue in https://tickets.puppetlabs.com/browse/PUP-3135 but it is accepted without a solution.

I wonder if there is a workaround you recommend or a fix for this. Using Puppet 4.4.2.

Resource is:

file{'Copy Team City agent tools':
    ensure => directory,
    path => $tc_tools_path,
    source => 'puppet:///tools/TeamCityTools',
    recurse => true,
}

Solution

  • Puppet has not still resolved this (https://tickets.puppetlabs.com/browse/PUP-3135).