Ask Your Question

fstab management - is AlexCline-fstab module ok with 5.5.0? remove entries failing with error.

asked 2018-04-13 10:10:48 -0600

greg_416 gravatar image

updated 2018-04-16 09:13:50 -0600

DarylW gravatar image


New-ish to puppet.. I ran into a problem trying to remove an entry from fstab, using AlexCline-fstab module which I have been using for a few months. Today for the first time I was asked to remove an entry from fstab. When I attempted to update the clients, they would throw an error "....Error sending command 'match' with params nil/Unknown command". Doing some searching, others were having the problem and indications were that it was fixed, years ago. I'm using the latest 5.5.0 puppet, and the most current fstab module it appears... It looks like the module hasn't had an update since 2013. My question is, is there another fstab management module or other methods to remove defunct entries from the fstab file I should be looking at? Thanks for your time.

What is the standard/best practice method puppet users should employ to deal with fstab currently?

take care, greg

edit: Here is what it looks like in the manifest:

 fstab { '_____PROJECT EVAL_____':
  source => 'i1-vlan120-nfs3:/eval',
  dest   => '/.mounts/eval',
  type   => 'nfs',
  opts   => 'rsize=65536,wsize=65536,hard,intr,vers=3',
  dump   => 0,
  passno => 0,

changed to in an attempt to remove it:

 fstab { '_____PROJECT EVAL_____':
 ensure = > absent,
  source => 'i1-vlan120-nfs3:/eval',
  dest   => '/.mounts/eval',
  type   => 'nfs',
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-13 10:44:37 -0600

greg_416 gravatar image

updated 2018-04-16 09:13:32 -0600

DarylW gravatar image

changing the code referenced in the post:

Wonder why the author hasn't updated his repo...

File to edit: modules/fstab/manifests/augeas.pp

code should end up looking similar to:

 'absent': {
     include fstab::variables
     $fstab_match_line = "*[spec='${source}' and file='${dest}']"
      augeas { $name:
        context => "/files${fstab::variables::fstab_file}",
        changes => [
          "rm ${fstab_match_line}",
        onlyif  => "match ${fstab_match_line} size > 0"

case closed, thanks. greg

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2018-04-13 09:50:02 -0600

Seen: 46 times

Last updated: Apr 16

Related questions