Not sure what is wrong with the below configuration
sh-4.2# cat /etc/puppetlabs/code/environments/production/manifests/demo.pp
node stapp03.stratos.xfusioncorp.com {
file_line { 'replace line': path => '/opt/devops/demo.txt',
line => 'Welcome to xFusionCorp Industries!',
match => "Welcome to Nautilus Industries!",
}
}
The line looks replaced as I took a backup first just in case
[banner@stapp03 ~]$ diff demo.txt /opt/devops/demo.txt
2c2
< Welcome to Nautilus Industries!
---
> Welcome to xFusionCorp Industries!
[banner@stapp03 ~]$
yeah, unfortunately I didn’t save the question as it doesn’t show it anymore once the task is failed, but I’m almost sure that the data in there is correct.
Here’s the failed message
Something is wrong with demo.pp as /opt/devops/demo.txt file does not contain correct data on App Server 3
your solution is wrong and actually misleading others, in fact you have wrongly configured your lines
line => ‘Welcome to xFusionCorp Industries!’,
match => “Welcome to Nautilus Industries!”,
these two should be exactly different.
file_line { 'replace':
path => $line::path_to_conf,
replace => true,
line => $line::new_line_to_use,
match => $line::exact_match_for_old_line
}
I have this task Puppet String Manipulation but can’t complete it as puppetserver service on the puppetmaster (jumphost) is not starting and my task will soon expire.
I have tried reducing and increasing the memory configuration “java -Xms2g -Xmx2g” and also changing ownership of “/opt/puppetlabs/server/data/puppetserver” to puppet:puppet to no avail.
Please review this and mark this task pending for me.
See image for error (I am a new user here and can only attached one image):