0

i want to delete a file "/root/abc" after ensuring if /root/abc file is empty.

file { '/root/abc' :

ensure => absent,
content => '',
}

But this is not working.. can anybody help me in this ?

vishu
  • 1
  • 2
  • Why not just `ensure => absent`? Surely if the file is deleted, you don't care about the content? – Craig Watson Feb 06 '19 at 15:03
  • i don't want to delete the file if it contains something.... actually its a route file and puppet is adding route in it. So before deleting the file i just want to ensure that puppet is not making route in it and its an empty file. – vishu Feb 06 '19 at 17:43

0 Answers0