Ask Your Question
0

How to manage fstab on gentoo?

asked 2014-09-19 17:26:08 -0500

beeg gravatar image

I've tried what I could, but couldn't find a way to manage fstab on gentoo. None of these seem to work. Suggestions?

mounts { 'Mount point for STA':
  ensure => present,
  source => 'none',
  dest   => '/var/www/sta',
  type   => 'tmpfs',
  opts   => 'size=512M',
}

fstab { 'A fstab entry':
  source => 'none',
  dest   => '/var/www/sta',
  type   => 'ext4',
  opts => 'size=512M',
}

class data_mounted {
    mount { "/var/www/sta":
        device  => "none",
        fstype  => "tmpfs",
        ensure  => "mounted",
        options => "size=512M",
        atboot  => "true",
    }
}
edit retag flag offensive close merge delete

Comments

What do you mean by "They don't work"? Sharing the puppet agent's output with `--debug` might help

fuero gravatar imagefuero ( 2014-09-20 05:16:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-09-20 14:00:11 -0500

ramindk gravatar image

I recommend that you stop guessing at resource types. There are no Puppet provided resources named fstab or mounts. There is a resource type named mount which should add the mount and update fstab.

If you use the following code, what happens? Does Puppet mount and update fstab correctly? If not, what does it do and what do the logs say?

mount { '/var/www/sta':
  ensure  => mounted,
  device  => 'none',
  fstype  => 'tmpfs',
  options => 'size=512M',
  atboot  => true,
}
edit flag offensive delete link more

Comments

Thanks ramindk. For the record, I wasn't just guessing. I was googling, but evidently looking in the wrong places. I'm new to puppet, and hadn't supposed that this functionality was built in, so I was downloading and using modules to add the functionality in, but they were not working on gentoo.

beeg gravatar imagebeeg ( 2014-09-22 10:30:28 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-09-19 17:26:08 -0500

Seen: 337 times

Last updated: Sep 20 '14

Related questions