Hello,
I am copying a script using template resource to my host so I can execute it in my recipe using exec resource. I am reading password from data bag and putting it the script file, execute the script and delete it. Everything works fine. But below template resource spits the password(content of template file) on stdout. Is there a way I can mask it and stop template resource to not show output in stdout ? (only for this resource)
template ‘/tmp/dbconf.sh’ do
source 'dbconf.sh.erb’
mode '0755’
owner 'root’
group 'root’
variables(
:root_password => data_item[‘mysql_root_password’]
)
end
execute ‘set-password’ do
command '/tmp/dbconf.sh’
not_if do ::File.exists?("/etc/myapp") end
end
file ‘/tmp/dbconf.sh’ do
action :delete
end
Thanks,
Maneesh