Created
August 8, 2017 15:08
-
-
Save abuxton/641aaa22d46e5013f60ade8c62411594 to your computer and use it in GitHub Desktop.
puppet mountpoints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manifests/service/pe/mountpoints.pp | |
class my_profile::service::pe::mountpoints{ | |
if !defined(File['/opt/software']){ | |
file{ '/opt/software/': | |
ensure => directory, | |
} | |
} | |
ini_setting { 'Create the software mountpoint': | |
ensure => present, | |
setting => 'path', | |
value => '/opt/software', | |
key_val_separator => ' ', | |
path => "${::settings::confdir}/fileserver.conf", | |
section => 'software', | |
require => File['/opt/software'], | |
notify => Service['pe-puppetserver'], | |
} | |
# This is open in fileserver.conf but closed in auth.conf | |
ini_setting { 'Set permissions for the software mountpoint': | |
ensure => present, | |
setting => 'allow', | |
value => '*', | |
key_val_separator => ' ', | |
path => "${::settings::confdir}/fileserver.conf", | |
section => 'software', | |
require => [ | |
Ini_setting['Create the software mountpoint'], | |
], | |
} | |
# # PE manages this file, until you edit it | |
# # once you edit it,the file resource is | |
# # removed form the catalog. | |
# $pe_managed_file = defined(File['/etc/puppetlabs/puppet/auth.conf']) ? { | |
# true => [ | |
# File[ | |
# '/etc/puppetlabs/puppet/auth.conf' | |
# ], | |
# File[ | |
# "${::settings::confdir}/keys" | |
# ] | |
# ], | |
# false => File[ | |
# "${::settings::confdir}/keys" | |
# ], | |
# } | |
# | |
# | |
# # Set up a custom file share to allow software to be copied to | |
# # cnodes, such for deployment in liou of a repository | |
# puppet_auth { 'Allow matching ^/file_(metadata|content)s?/software/': | |
# ensure => present, | |
# path => '^/file_(metadata|content)s?/software/', | |
# path_regex => true, | |
# authenticated => 'any', | |
# allow => '*', | |
# ins_before => 'path[allow][. = "/puppet/v3/file"]', | |
# require => $pe_managed_file, | |
# notify => Service['pe-puppetserver'], | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment