So I got past the confusion. Here is what the rest_api.html doc should say (it was missing the underscore) for an example:
curl -H "Accept: yaml" https://puppetmaster:8140/production/file_metadata/modules/puppet/puppet.conf As to the problem I am having, I am guessing that I have something configured incorrectly. When I send the request via the REST API, the environment is set correctly to development (for my tests) and the metadata is pulled correctly. However, when I do a puppet run it is using the production environment, where only some of my files live. So if I pass the --environment flag set to development my problem goes away. Why doesn't it use the environment passed from the node classifier? -eric On Dec 10, 12:36 pm, Eric Snow <es...@verio.net> wrote: > So it looks like that doc is misleading. It would help if there were > a curl example for the API request for files... As it is, it may be > that the environment is factored in after all. Still trying to figure > it out. Any ideas would be great! > > -eric > > On Dec 10, 11:17 am, Eric Snow <es...@verio.net> wrote: > > > > > > > > > I just tried using the REST API to pull the file metadata and noticed > > that the environment is not part of the API for files: > > > http://docs.puppetlabs.com/guides/rest_api.html > > > Does that mean that it will not respect my environments for the > > following: > > > file { 'test': > > source => 'puppet:///modules/somemodule/test' > > > } > > > If not then which "environment" from the puppet.conf does it use? > > [main]? > > > Thanks. > > > -eric > > > On Dec 9, 8:12 pm, Eric Snow <es...@verio.net> wrote: > > > > I get the following error: > > > > ... Failed to retrieve current state of resource: Could not retrieve > > > information from source(s) ... > > > > My understanding is that the file server had trouble pulling the > > > metadata for the file (on the server side). This could be due to a > > > connectivity issue, or a permissions issue. What other reasons are > > > there? Does the target affect it as well? Where in the puppet code > > > does all this happen? (for instance that error is coming from type/ > > > file/source.rb, so what gets to that code?). > > > > I have verified all my permissions (both of files and directories). > > > All the connections are fine. However, some of my files work fine and > > > others do not. The same files in both cases, every time. > > > > The files that work are ones that were done back when I had one > > > modules directory in my module_path. However, now I have several. > > > The ones that are in modules I have added since I split my modules > > > directories are the ones that do not work. The old ones work even > > > though I moved them into the new modules directories. > > > > This is driving me crazy. Any thoughts? > > > > -eric -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.