how to check whether file exist
Hi,
I had written a manifest code to check whether the directory /opt exist in ubuntu & centos systems as,
if $operatingsystem == 'RedHat && Ubuntu' {
file { "/opt": mode => 755, owner => root, group => root, ensure => directory, } } }
notify { "The 'opt' directory exist for Ubuntu & Centos servers.": }
Can anyone suggest a better manifest code as compared to mine as above.
Thanks