Hello,
I have tried and it was working, extend the pp as per your
requirements.
I haven't set any metaparameter. please add as per your
requirements.
Let me know if you find any difficulty.
# Testing
class locate {
Exec { path => "/usr/bin:/usr/sbin:/bin:/sbin" }
exec { "replace" : command => "sed -i
's/
example.com/$ipaddress/' `find /root/scripts/ -type f -iname
'*.cfg'`" }
exec { "extension" : command => "rename .cfg .conf `find
/root/scripts/ -type f -iname '*.cfg'`" }
Exec['replace']->Exec['extension']
} # End of locate
Output :
-------------
opensuse01:~/scripts # ll
total 12
-rw-r--r-- 1 root root 12 Mar 31 12:30 1.conf
-rw-r--r-- 1 root root 12 Mar 31 12:30 2.conf
-rw-r--r-- 1 root root 12 Mar 31 12:30 3.conf
opensuse01:~/scripts # cat *
196.1.1.136
196.1.1.136
196.1.1.136