On Monday, December 22, 2014 8:22:40 AM UTC-6, Manjunatha T N wrote:
>
> Hi,
>
> I am using Puppet master and client 3.7 and for store configs MySql DB.
> Here I am trying to export IPaddress from one node another. When I ran the
> agent in client node it is executing without any error, could see the
> related node details in MYSQL db but not able collect it and mentioned
> file is showing as empty. Please find the below my classes details and
> puppet conf details. Please help me to fix this issue. Thanks in advance.
> -------------------------------------------------------
>
Looking at this code:
> class admin::file {
> @@file {"/tmp/ip.txt/${::ipaddress}":
> path => '/tmp/ip.txt/',
>
there are a few strange things:
- You do not specify an 'ensure' value. It looks like you want ensure
=> 'file'. This could be the source of your issue.
- You use a path-like title but a different 'path' property. That's not
an error, but it's not very useful. I'm inclined to think that you expect
different behavior to result from this than you actually will get.
- The value of the 'path' property ends with a '/' character. That's a
semantic error (but not a syntax error). The master is unlikely to
complain about it, but it's unclear whet the effect will be at the agent.
> content => "\ndefine('DB_HOST',\t${::ipaddress});",
> tag => "ip"
> }
> }
>
> node 'dbserver.garuda.com'
> {
> include admin::file
> }
>
> class admin {
> File <<| tag == 'ip" |>>
> }
>
Also, you have mismatched quotes in your collector (above). If that's the
code actually appearing in your manifest set then the master should throw a
parse error for any node that declares class 'admin'. Depending on
Puppet's configuration, the agent on such a node might in that case apply a
cached catalog. This also might explain your problem.
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/7d3895da-efde-4cf0-b09d-f4d6033dc1e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.