Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new type autofs::map #57

Merged
merged 1 commit into from
Jun 13, 2017
Merged

Conversation

traylenator
Copy link
Contributor

@traylenator traylenator commented Jun 13, 2017

autofs::map allows a map entry to be added to
a pre configured map file. e.g.

autofs::mount{'/data':
  mapfile => '/etc/auto.data',
  mount   => '/data',
  mapcontents => [
    'C -rw nfs.example.org:/path/to/C',
    'C -rw nfs.example.org:/path/to/C',
  ]
}

autofs::map{'A':
  mapfile  => '/etc/auto.data',
  mapcontent => 'A -rw  nfs.example.org:/path/to/A',
}

In this case the auto.data file is now managed as a concat file.

The motivation here is to make the configuration more modular.

autofs::map allows a map entry to be added to
a pre configured map file. e.g.

```puppet
autofs::mount{'/data':
  mapfile => '/etc/auto.data',
  mount   => '/data',
  mapentry => [
    'C -rw nfs.example.org:/path/to/C',
    'C -rw nfs.example.org:/path/to/C',
  ]
}

autofs::map{'A':
  mapfile  => '/etc/auto.data',
  mapentry => 'A -rw  nfs.example.org:/path/to/A',
}
```

In this case the `auto.data` file is now managed as a concat file.

The motivation here is to make the configuration more modular.
@traylenator traylenator added the enhancement New feature or request label Jun 13, 2017
@traylenator traylenator reopened this Jun 13, 2017
@traylenator
Copy link
Contributor Author

I was thinking it may make sense to just call autofs::map for each of the elements of the mapcontents array. In adition the concat could be moved to autofs::map also wrapped in an ensure resource.
This would make #58 redundant. The problem is however I don't see a ways to set to the excutable bit in a sensible way other than leave the concat in the autofs::mount type.

@dhollinger
Copy link
Member

Looks great! Thanks!

@dhollinger dhollinger merged commit 9e85a9b into voxpupuli:master Jun 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants