On Friday, June 26, 2015 at 7:26:49 PM UTC-5, Aaron Lager wrote:
>
> I'm evaluating PE and after the super simple success of the ntp example, I 
> thought I'd try out the /etc/hosts modules.
> I'm trying to add additional host entries, but all that happens is my 
> existing additional entries (including one for puppet) get removed from the 
> nodes host file.
>
> Here is my value for host_entries:
> {"10.150.28.8":"puppet.mybluebolt.com"}
>
> There are no errors reported, that I'm aware of.  The documentation simply 
> says it's a Hash of host entries.
> I don't understand what I am doing wrong.
>
> Thanks for any help you can give.
>
>

I cannot say exactly what you're doing wrong, as I am uncertain what "the" 
/etc/hosts modules are, or why anyone would need more than one such 
module.  You clearly are not talking about the standard Host resource type, 
as it has no parameter named "host_entries".

Inasmuch as the Host resource uses the hostname as its identifier, I 
suspect the wanted hash will have hostnames as keys.  I would not be 
surprised to hear that the expected form of the hash was something like 
this (YAML):

'hosts::hostentries':
  'puppet.mybluebolt.com':
    'ip': '10.150.28.8'
    'host_aliases': 'puppet'  # optional; may also be an array

That matches up with the underlying Host resource type 
<https://docs.puppetlabs.com/references/stable/type.html#host>, and it is 
the form that would be used with the standard create_resources() function 
<https://docs.puppetlabs.com/references/stable/function.html#createresources>.  
This is all an educated guess, however, inasmuch as I don't know what 
module you are in fact using.  Any way around, I'm sure PL would appreciate 
feedback about the shortcomings of its documentation on this point.  They 
might pick it up from your post here, as several employees do participate, 
but you cannot rely on that.


Regards,

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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/55d7f43a-45e4-4faa-af63-4bb7d7dfff7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to