On Thursday, April 11, 2013 1:11:16 PM UTC-5, Rahul Khengare wrote:
>
> Hi all,
>      I am writing two modules abc and xyz. In both the modules i have to 
> change common "test.txt" file,here i use template (.erb) file to changing 
> the contents.
> In both abc and xyz the contents of "test.txt" file is different, if i 
> declare file resource for "test.txt" file in two different modules it gives 
> duplicate declaration of resource error. 
> For the correct working of modules abc and xyz, i have to change the 
> test.txt file twice.
> How i overcome this situation ?       
>     I  am new to community, so i am not very familiar to format of query 
> posting,sorry about that.
> Thanks in advance for answers.
>

You can't do that.  The only way you can have two modules edit the same 
file is if you use file_line or augeas, and even then, you need to make 
sure they don't step on each other's toes.

You would probably be better off pulling that file either into it's own 
module or into a wrapper class that combined the chagnes both of the others 
need to make.
 

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to