Re: Puppet module autofs assistance

Bollinger, John C

Hello Justin,


I’m sorry you’re having difficulty.


The first problem appears to be with your formatting of the value of the 'mappings' key in the value of the 'mapfiles' parameter.  What is expected is an array of hashes that each one contains both a 'key' and an 'fs', and optionally 'options'.  Instead, you have presented an array of three separate hashes, each with just one key.  You’re close; it looks like what you actually want is this:



  ensure: 'present'

  path: '/etc/auto.home'


    - key: '*'

      options: 'rw'

      fs: 'nfs-1:/home/&'


That array of hashes syntax always looks a bit weird to me, though.  If you think the same, then you could consider formatting it this way instead, which I think is equivalent:



  ensure: 'present'

  path: '/etc/auto.home'


    - { key: '*', options: 'rw', fs: 'nfs-1:/home/&' }




I’m afraid I cannot explain the error about a 'format' parameter to Concat_file[/etc/auto.master], however.  Puppet-autofs does not directly declare any concat_file resources, or provide resource defaults for them, or override any of them (nor should it). Version 5.0.0 does not declare a ‘format’ parameter for _any_ class or resource, and none of its own classes or resources accept such a parameter.


If I were to speculate, I’d guess that the error arises from in-scope resource defaults or from a resource override, somewhere among your own local manifests.



Best regards,


John Bollinger



From: [] On Behalf Of J so
Sent: Wednesday, July 11, 2018 3:25 AM
Subject: [voxpupuli] Puppet module autofs assistance




I been using a previous version of your module for some time.  I recently upgraded to 5.0.0 and have had little success formatting the data to even get a single Puppet run.  I am using Foreman 1.18RC1 with Puppet 5.3.3.  


'mapfiles' param:



  path: '/etc/auto.home'


  - key: '*'

  - options: 'rw'

  - fs: nfs-1:/home/&


mounts param:



  ensure: present

  mount: '/home'

  mapfile: '/etc/auto.home'

  options: '--timeout=300'


Puppet errors:


Could not retrieve catalog...  ...Autofs::Mapfile[home]:

parameter 'mappings' index 0 expects a value for key 'fs'

parameter 'mappings' index 1 expects a value for key 'key'

parameter 'mappings' index 1 expects a value for key 'fs'

parameter 'mappings' index 0 expects a value for key 'key'


Error: no parameter named 'format' (file:  .../concat/manifests/init.pp, line 94) on Concat_file[/etc/auto.master] ...



Hopefully this is enough to allow an opportunity to be pointed in the right direction.  I have been bashing my brain against this for some time now.


Thanks in advance!




Justin Soppe


Email Disclaimer:
Consultation Disclaimer:

Join to automatically receive all group messages.