> create a md5 sum or something of both the file and my newly created content

I think what you would want to do is pull out the dbnames from the
tnsname.ora file and then compare that list against what the resource
is trying to set.   If the desired dbnames list and the list currently
in the tnsnames.ora file match then exists? would return true.  If not
then you would update the file content to match the desired results.

If you think of the 'host' type which updates records in the systems
hosts file.   It's not going to tell you the resource is up to date
if /etc/hosts is present.  I think it pulls the hosts file into an
array and then does a comparison of each host resource host/ip against
what is in the array.

For example this resource would check to see that loopback2 is in the
hosts file and associated with 127.0.0.2.

host { 'loopback2':
  ip => '127.0.0.2',
}

I can't comment on what's correct or not since I've no clue:)
Good Luck!  Derek.


> string. Problem is: is this the correct way to do it? I've found multiple
> type & provider examples on github which DO NOT do this. Are they all
> inherently broken? Could someone confirm or deny this?
>
> I'll have a look and see if I can find the types (host and
> ssh_authorized_keys) you are referring to.
>
> Many thanks,
>
> Michael

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to