voxpupuli / puppet-augeasproviders_puppet Goto Github PK
View Code? Open in Web Editor NEWAugeas-based Puppet configuration types and providers for Puppet
License: Apache License 2.0
Augeas-based Puppet configuration types and providers for Puppet
License: Apache License 2.0
Given the following auth.conf
path ~ ^/catalog/([^/]+)$
method find
auth yes
allow $1
path ~ ^/node/([^/]+)$
method find
auth yes
allow $1
path /certificate_revocation_list/ca
method find
auth yes
allow *
path ~ ^/report/([^/]+)$
method save
auth yes
allow $1
path /file
auth yes
allow *
path /certificate/ca
method find
auth any
allow *
path /certificate/
method find
auth any
allow *
path /certificate_request
method find, save
auth any
allow *
path /v2.0/environments
method find
auth yes
allow *
path /facts
method find, search
auth any
allow pe-internal-dashboard
path /resource_type
method find, search
auth yes
allow pe-internal-dashboard, pe-internal-classifier
path /
auth any
With the following puppet code
puppet_auth { 'allow the diff server to retrieve any catalog':
ensure => present,
path => '^/catalog/([^/]+)$',
path_regex => true,
authenticated => 'yes',
methods => 'find',
allow => ['$1', $diff_master],
}
puppet_auth { 'allow the diff server to query facts':
ensure => present,
path => '/facts',
authenticated => 'any',
path_regex => false,
methods => [ 'find', 'search'],
allow => ['$1', $diff_master, 'pe-internal-dashboard'],
}
Causes the no changes and results in a rather strange diff
Notice: /Stage[main]/Catalog_diff/Puppet_auth[allow the diff server to retrieve any catalog]/allow: allow changed ['$1'] to '$1 compile-master-1.vm'
Notice: /Stage[main]/Catalog_diff/Puppet_auth[allow the diff server to query facts]/allow: allow changed ['pe-internal-dashboard'] to '$1 compile-master-1.vm pe-internal-dashboard'
Notice: /Stage[main]/Puppet_enterprise::Profile::Master::Auth_conf/File[/etc/puppetlabs/puppet/auth.conf]/content:
--- /etc/puppetlabs/puppet/auth.conf 2015-08-31 19:11:55.472823920 +0000
+++ /tmp/puppet-file20150831-22170-12rzjfw 2015-08-31 19:11:55.482828920 +0000
@@ -1,7 +1,7 @@
path ~ ^/catalog/([^/]+)$
method find
auth yes
-allow $1, compile-master-1.vm
+allow $1
path ~ ^/node/([^/]+)$
method find
@@ -45,7 +45,7 @@
path /facts
method find, search
auth any
-allow $1, compile-master-1.vm, pe-internal-dashboard
+allow pe-internal-dashboard
path /resource_type
method find, search
I have been trying to figure out how to manage the puppet.conf contents, and my preference is always augeasproviders. I'm trying to determine how best to tackle this.
1: A single giant type/provider set that handles the whole file. This just doesnt seem like it would work to me, because of sections like environments.
2: A separate type per section (main, master, agent, environments) with a shared provider? Is that even doable?
3: Separate type/provider per section. seems like lots of dupe work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.