The mount resource has an "atboot" parameter. If set to true it will modify 
/etc/fstab and ensure that it gets mounted every time at boot. I have 
something similar for one of our manifests:

I create a logical volume, then a filesystem, then mount it. The mount 
option ensures that it gets mounted at boot.

# Create the logical volumes (LV) used on host automation servers.
# Create the LV and filesystem used for tool logging, then mount the 
filesystem.
logical_volume { 'hostauto-toollog':
  ensure       => 'present',
  name         => $lvdata['toollog']['name'],
  volume_group => $profile::hostautomation::vgname,
  size         => $lvdata['toollog']['size'],
  before       => [Class['profile::hostautomation::directories'], Class[
'profile::symlinks']]
}


filesystem { 'hostauto-toollog':
  ensure  => 'present',
  name    => 
"/dev/${profile::hostautomation::vgname}/${lvdata['toollog']['name']}",
  fs_type => $filesystem_type,
  require => Logical_volume['hostauto-toollog'],
}


mount { 'hostauto-toollog':
  ensure  => 'mounted',
  name    => $lvdata['toollog']['mountpoint'],
  atboot  => true,
  device  => 
"/dev/${profile::hostautomation::vgname}/${lvdata['toollog']['name']}",
  fstype  => $filesystem_type,
  require => Filesystem['hostauto-toollog'],
}

Thanks,
Joshua Schaeffer

On Tuesday, May 2, 2017 at 10:56:58 AM UTC-6, dkoleary wrote:
>
> Hey;
>
> Core requirement: have puppet manage auditd on a separate /var/log/audit 
> filesystem.
>
> I've seen the mount resource so I can have the auditd module require the 
> file/dir /var/log/audit (for permissions) which requires the mount point 
> /var/log/audit which will, if necessary, update /etc/fstab.  I don't see 
> any way to generate a new device using that, though. I can pre-generate 
> that but I'd like to have puppet do it so it'll catch any new systems 
> getting built.
>
> Enter the puppetforge lvm module.  That looks cool.  The examples on the 
> web show the mountpath and mountpath_require option but I can't tell if 
> that'll update /etc/fstab.  Doesn't appear to.  
>
> Anyone have any hints/tips/suggestions on having modules interact with 
> mountpoints and linux lvm before I see if I can blow up a test box?
>
> Thanks
>
> Doug O'Leary
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9fd121cf-d681-4c65-a323-81bab401e1fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to