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.
-------------------------------------------------------
class admin::file {
@@file {"/tmp/ip.txt/${::ipaddress}":
path => '/tmp/ip.txt/',
content => "\ndefine('DB_HOST',\t${::ipaddress});",
tag => "ip"
}
}
{
include admin::file
}
class admin {
File <<| tag == 'ip" |>>
}
{
include admin
}
-------------------------------------------------
#/etc/puppet/puppet.conf
[master]
dbadapter = mysql
dbuser = puppet
dbpassword = P@ssw0rd
dbsocket = /var/run/mysqld/mysqld.sock
----------------------------------------------------------------mysql> select * from hosts;
+----+------------------+--------------+-------------+---------------------+-----------------+-------------+---------------------+----------------+---------------------+
| id | name | ip | environment | last_compile | last_freshcheck | last_report | updated_at | source_file_id | created_at |
+----+------------------+--------------+-------------+---------------------+-----------------+-------------+---------------------+----------------+---------------------+
| 1 | puppet.openstack | 10.100.1.188 | production | 2014-12-22 23:57:30 | NULL | NULL | 2014-12-22 23:57:30 | NULL | 2014-12-21 21:50:53 |
+----+------------------+--------------+-------------+---------------------+-----------------+-------------+---------------------+----------------+---------------------+
---