Hi ,
I just have a question. I need to read a variable value from the file using puppet.
I wrote below line of code in a puppet
$variable = inline_template("<% '/bin/sed -n 's/^ *profileName *= *//p' /opt/IBM/ResponseFiles/DMGR_Creation.txt' %>")
The file DMGR_Creation.txt contains a line as
profileName=ABC
I need to read the value ABC . When I execute the above sed command it runs without any issue but when i run it in puppet it throws error as below
Error::Syntax error at 's/^ *profileName *= *//p' in the file when I run puppet.
I tried
$variable = inline_template("<% '/bin/awk '/^profileName/{print $nf}' /opt/IBM/ResponseFiles/DMGR_Creation.txt' %>")
but I again get error for curly brackets.
Can any one please help in resolving my issue here ?
Thanks
↧