Hello all,
I have the following code I use to populate /etc/hosts :
# This module will gather hostnames and IPs in order to populate hosts files
class hosts {
host { 'localhost.localdomain':
ensure => present,
ip => '127.0.0.1',
host_aliases => [ 'localhost' ],
}
@@host { $fqdn:
ensure => present,
ip => $ipaddress_eth0,
host_aliases => [ $hostname, $tag_name ],
}
# Here we ensure we are capturing all exported nodes
Host <<| |>>
}
I would like to send the exported resources to another file too (/usr/local/etc/ec2-hosts)
How can I get the exported resources above (hostname and ip) in to such file?
A sym-link from /etc/hosts will not work for what I need.
Cheers,
A sym-link from /etc/hosts will not work for what I need.