I want to check to see of a directory is a mount point for a separate 
partition. For example, I'd like to check to see if /tmp is a separate 
partition or is just part of the root partition on a Linux system. What is 
the best way to do this. I thought I could use the in operator to see if 
'/tmp' exists in $fact['partitions']['mount'], but that doesn't seem to 
work. For example, I tried this code, where /boot is definitely a separate 
partition, but /tmp is not: 

class mount_points {
  if '/tmp' in $facts['partitions']['mount'] {
    notify { '/tmp is a separate partition': }
  }
  else {
    notify { '/tmp is NOT a separate partition': }
  }
  if "/boot" in $facts['partitions']['mount'] {
    notify { '/boot is a separate partition': }
  }
  else {
    notify { '/boot is NOT a separate partition': }
  }
}

Unfortunately, when I run this, puppet says both directories are NOT 
separate partitions. Is there something wrong with this syntax, or is this 
approach entirely wrong? 

Prentice


-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6d292a30-1ed0-4d60-93c8-80c65949c765%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to