SlideShare ist ein Scribd-Unternehmen logo
1 von 50
Downloaden Sie, um offline zu lesen
puppetconf.com #puppetconf
Loops and Unicorns
Future of the Puppet Language
Henrik Lindberg
Consulting Engineer | Puppet Labs
@hel
puppetconf.com #puppetconf
•  New parser
•  New Language Features
•  New approach
– Opt in to New/Experimental Features
– Maintaining Backwards Compatibility
Introduction
New Parser
The future is already here…
puppetconf.com #puppetconf
•  Rewritten from the ground up
•  Removes quirky grammar constraints
•  Improves error messages
•  Enabler for:
– opt-in to new and experimental features
– backwards compatibility
•  Use on command line, or in settings
New Parser
puppet apply –-parser future ...
puppetconf.com #puppetconf
De-Quirk
"This is a random number: ${fqdn_rand()}"
join([1,2,3])
$a = 0x0EH
$b = 0778
Interpolation and functions work:
Literal Array / Hash as argument in calls works:
Numbers must now be valid:
puppetconf.com #puppetconf
Array & Hash
$a = [1,2,3]
$b = [4,5,6]
$c = $a + $b
Concatenate Arrays:
Append to Array:
Merge Hash:
$d = $a << 4
$a = {name => 'mary'}
$b = {has => 'a little lamb'}
$c = $a + $b
puppetconf.com #puppetconf
Misc
unless $something { . . .}
else { . . . }
Unless Else:
Assignment is an expression:
Expression separator ';' :
$a = $b = 10
fqdn_rand($seed = 30)
$a = $x[1][1]
$a = $x[1];[1]
puppetconf.com #puppetconf
Error Reporting
Error: Could not parse for environment production:
Syntax error at 'node' at line 1 on node
kermit.example.com
puppet apply -e '$a = node "a+b" { }'
Then:
Now: Error: Invalid use of expression. A Node Definition
does not produce a value at line 1:6
Error: The hostname 'a+b' contains illegal characters
(only letters, digits, '_', '-', and '.' are allowed)
at line 1:11
Error: Classes, definitions, and nodes may only appear
at toplevel or inside other classes at line 1:6
Error: Could not parse for environment production:
Found 3 errors. Giving up on node kermit.example.com
New Approach
puppetconf.com #puppetconf
•  Forgiving Grammar
•  Validation is separate
– Can validate a particular language version
– Language version != Puppet version
•  Evaluation is separate
– Can evaluate a particular language version way
– Language version != Puppet version
Separation of Language
Concerns
New Language Features
puppetconf.com #puppetconf
puppetconf.com #puppetconf
puppetconf.com #puppetconf
puppetconf.com #puppetconf
puppetconf.com #puppetconf
•  Iteration & Lambdas
•  Puppet Bindings
•  Heredoc support
•  Puppet Templates
New Language Features
Iteration & Lambdas
puppetconf.com #puppetconf
Concepts
each($foo) |$x| { notice $x }
The lambda:
Inline call:
$foo.each |$x| { notice $x }
each($foo) |$x| { notice $x }
puppetconf.com #puppetconf
•  each
•  select – reject
•  collect
•  reduce
•  slice
Custom functions can take a lambda!
Iterating Functions
puppetconf.com #puppetconf
Each - Array
$a = ['a', 'b', 'c']
$a.each |$value| { notice $value }
Iterating over an array:
Produces:
Notice: Scope(Class[main]): a
Notice: Scope(Class[main]): b
Notice: Scope(Class[main]): c
puppetconf.com #puppetconf
Each – Array (with index)
$a = ['a', 'b', 'c']
$a.each |$index, $value| { notice "$index = $value" }
Iterating over an array – with index:
Produces:
Notice: Scope(Class[main]): 0 = a
Notice: Scope(Class[main]): 1 = b
Notice: Scope(Class[main]): 2 = c
puppetconf.com #puppetconf
Each - Hash
$a = {a => 10, b => 20, c => 30}
$a.each |$key, $value| { notice "$key = $value" }
Iterating over a hash – with key and value:
Produces:
Notice: Scope(Class[main]): a = 10
Notice: Scope(Class[main]): b = 20
Notice: Scope(Class[main]): c = 30
puppetconf.com #puppetconf
Each – Hash (elements)
$a = {a => 10, b => 20, c => 30}
$a.each |$elem| { notice "${elem[0]} = ${elem[1]}" }
Iterating over a hash elements:
Produces:
Notice: Scope(Class[main]): a = 10
Notice: Scope(Class[main]): b = 20
Notice: Scope(Class[main]): c = 30
puppetconf.com #puppetconf
Select / Reject
$a = [1, 2, 3]
notice $a.select |$value| { $v == 2 }
notice $a.reject |$value| { $v == 2 }
Select and Reject elements:
Produces:
Notice: Scope(Class[main]): 2
Notice: Scope(Class[main]): 1 3
puppetconf.com #puppetconf
Collect
$a = [1, 2, 3]
notice $a.collect |$value| { $v * 10 }
Transform each element with collect:
Produces:
Notice: Scope(Class[main]): 10 20 30
puppetconf.com #puppetconf
Reduce
$a = [1, 2, 3]
notice $a.reduce |$memo, $value| { $memo + $value }
Reduce all elements into one:
Produces:
Notice: Scope(Class[main]): 6
puppetconf.com #puppetconf
Examples
$usernames.each |$x| {
file { "/home/$x/.somerc":
owner => $x
}
}
Set ownership of some "rc-file" for each user:
Setting 'owner' and 'mode' from a Hash:
$users_with_mode = ['fred' => 0666, 'mary' => 0777 ]
$users_with_mode.each |$user, $mode| {
file {"/home/$user/.somerc":
owner => $user,
mode => $mode
}
}
puppetconf.com #puppetconf
Examples
$a.select |$x| { $x =~ /com$/ }.each |$x| {
file { "/somewhere/$x":
owner => $x
}
}
Filter and create resources:
Include classes based on array of roles:
$roles.each |$x| { include "role_$x" }
puppetconf.com #puppetconf
Custom Function (Ruby)
pp_block = args[-1]
Lambda always last argument:
Was it given?
Call it:
pp_block.is_a? Puppet::Parser::AST::Lambda
# in a custom function, self is scope)
pp_block.call(self, 'hello', 'world')
puppetconf.com #puppetconf
•  http://links.puppetlabs.com/arm2-iteration
•  http://links.puppetlabs.com/arm2-examples
ARM 2 - Iteration
Heredoc
Not yet on master branch
https://github.com/puppetlabs/puppet/pull/1659
puppetconf.com #puppetconf
Heredoc - Syntax
@( ["]<endtag>["] [:<syntax>] [/<escapes>] )
<text>
[|][-] <endtag>
ENDS-­‐HERE	
  
anything	
  not	
  in	
  <text>	
  
	
  
"ENDS-­‐HERE"	
  
with	
  interpola2on	
  
:json	
  
syntax	
  check	
  result	
  
/tsrn$L	
   	
  turns	
  on	
  escape	
  
/	
   	
   	
  turns	
  on	
  all	
  
|	
  
set	
  le7	
  margin	
  
-­‐	
  
trim	
  trailing	
  
t 	
  tab	
  
s 	
  space	
  
r 	
  return	
  
n 	
  new-­‐line	
  
$ 	
  $	
  
L 	
  <end	
  of	
  line>	
  
puppetconf.com #puppetconf
Heredoc – example
Example:
#.........1.........2.........3.........4.........5....
$a = @(END)
This is indented 2 spaces in the source, but produces
a result flush left with the initial 'T'
This line is thus indented 2 spaces.
| END
puppetconf.com #puppetconf
Heredoc – example
multiple on same line:
#.........1.........2.........3.........4.........5....
foo(@(FIRST), @(SECOND))
This is the text for the first heredoc
FIRST
This is the text for the second
SECOND
puppetconf.com #puppetconf
For more examples and details
•  http://links.puppetlabs.com/arm4-heredoc
ARM-4 Heredoc
Puppet Templates
Not yet on master branch
https://github.com/puppetlabs/puppet/pull/1660
puppetconf.com #puppetconf
•  Embedded Puppet (EPP) - like ERB
•  Same tags
§  <%, <%=, <%-, <%%, <%#
§  %>,-%>
•  Expressions are Puppet DSL
•  Parameterized
•  .epp file extension (by convention)
Puppet Templates
puppetconf.com #puppetconf
Use by calling
epptemplate(<name> [,<params_hash>])
inline_epptemplate(<text>[,<params_hash>])
Puppet Templates
$x = 'human'
inline_epptemplate('This is not the <%= $x %> you are
looking for.', { 'x' => 'droid'})
# => 'This is not the droid you are looking for.'
puppetconf.com #puppetconf
•  Parameterized
– declare parameters
– set default values
– parameter without value and no default = error
Puppet Templates
<%- ($x = 'human') -%>
This is not the <%= $x %> you are looking for.
puppetconf.com #puppetconf
For more examples and details
•  http://links.puppetlabs.com/arm3-
puppet_templates
ARM-3 Puppet Templates
Puppet Bindings / Data in Modules
puppetconf.com #puppetconf
•  More powerful data bindings
•  For both Data, and Puppet Extensions
•  Composes Hiera2 data in modules and
environment + Hiera1
•  Bindings in Ruby
•  Opt in on command line or in settings
Puppet Binder
puppet apply --binder
puppet apply –-parser future ...
puppetconf.com #puppetconf
•  Default:
– All hiera-2 data (in default location) and all
(default) ruby bindings from all modules on
module path composed
– Site level hiera-2 data and ruby bindings
override contributions from modules.
•  Customize
– include alternatives, exclude bindings
– add / reorganize overriding "layers"
Configuration
puppetconf.com #puppetconf
•  Composable
•  Interpolation using Puppet DSL expressions
•  Changed hiera.yaml syntax (for version 2)
Hiera 2
puppetconf.com #puppetconf
Minimal opt-in (in a module)
---
version: 2
hiera.yaml:
data/common.yaml:
data/${osfamily}.yaml:
---
myclass::myparam: '1.2.3'
---
myclass::myparam: '2.4.6'
puppetconf.com #puppetconf
For more examples and details
•  http://links.puppetlabs.com/arm8-
puppet_bindings
•  http://links.puppetlabs.com/arm9-
data_in_modules
ARM-8 & 9
Thank You
Henrik Lindberg
Consulting Engineer | Puppet Labs
@hel
Collaborate. Automate. Ship.
Follow us on Twitter @puppetlabs
youtube.com/puppetlabsinc
slideshare.net/puppetlabs
Collaborate. Automate. Ship.

Weitere ähnliche Inhalte

Was ist angesagt?

Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Nikita Popov
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl TechniquesDave Cross
 
Python decorators
Python decoratorsPython decorators
Python decoratorsAlex Su
 
Damien seguy php 5.6
Damien seguy php 5.6Damien seguy php 5.6
Damien seguy php 5.6Damien Seguy
 
Decorators in Python
Decorators in PythonDecorators in Python
Decorators in PythonBen James
 
PHP Performance Trivia
PHP Performance TriviaPHP Performance Trivia
PHP Performance TriviaNikita Popov
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationWorkhorse Computing
 
Barely Legal Xxx Perl Presentation
Barely Legal Xxx Perl PresentationBarely Legal Xxx Perl Presentation
Barely Legal Xxx Perl PresentationAttila Balazs
 
Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"Fwdays
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Workhorse Computing
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonSiddhi
 
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.Samuel Fortier-Galarneau
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation TutorialLorna Mitchell
 
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...Puppet
 

Was ist angesagt? (20)

Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Introduction to Perl and BioPerl
Introduction to Perl and BioPerlIntroduction to Perl and BioPerl
Introduction to Perl and BioPerl
 
Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)Static Optimization of PHP bytecode (PHPSC 2017)
Static Optimization of PHP bytecode (PHPSC 2017)
 
Intro to Perl and Bioperl
Intro to Perl and BioperlIntro to Perl and Bioperl
Intro to Perl and Bioperl
 
Advanced Perl Techniques
Advanced Perl TechniquesAdvanced Perl Techniques
Advanced Perl Techniques
 
Python decorators
Python decoratorsPython decorators
Python decorators
 
Damien seguy php 5.6
Damien seguy php 5.6Damien seguy php 5.6
Damien seguy php 5.6
 
Decorators in Python
Decorators in PythonDecorators in Python
Decorators in Python
 
PHP Performance Trivia
PHP Performance TriviaPHP Performance Trivia
PHP Performance Trivia
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 
Barely Legal Xxx Perl Presentation
Barely Legal Xxx Perl PresentationBarely Legal Xxx Perl Presentation
Barely Legal Xxx Perl Presentation
 
Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"Nikita Popov "What’s new in PHP 8.0?"
Nikita Popov "What’s new in PHP 8.0?"
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!
 
Creating Domain Specific Languages in Python
Creating Domain Specific Languages in PythonCreating Domain Specific Languages in Python
Creating Domain Specific Languages in Python
 
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.
Decorators Explained: A Powerful Tool That Should Be in Your Python Toolbelt.
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
 
Perl Basics with Examples
Perl Basics with ExamplesPerl Basics with Examples
Perl Basics with Examples
 
P4 2018 io_functions
P4 2018 io_functionsP4 2018 io_functions
P4 2018 io_functions
 
Metadata-driven Testing
Metadata-driven TestingMetadata-driven Testing
Metadata-driven Testing
 
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
Doing the Refactor Dance - Making Your Puppet Modules More Modular - PuppetCo...
 

Ähnlich wie Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013

Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Martin Alfke
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?NETWAYS
 
Functional Smalltalk
Functional SmalltalkFunctional Smalltalk
Functional SmalltalkESUG
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoMatt Stine
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringAlessandro Franceschi
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityGeorgePeterBanyard
 
Dataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in RubyDataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in RubyLarry Diehl
 
Puppet Node Classifiers Talk - Patrick Buckley
Puppet Node Classifiers Talk - Patrick BuckleyPuppet Node Classifiers Talk - Patrick Buckley
Puppet Node Classifiers Talk - Patrick BuckleyChristian Mague
 
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101bokonen
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?lichtkind
 
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet LabsThe Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet LabsPuppet
 
Test-Driven Puppet Development - PuppetConf 2014
Test-Driven Puppet Development - PuppetConf 2014Test-Driven Puppet Development - PuppetConf 2014
Test-Driven Puppet Development - PuppetConf 2014Puppet
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot CampTroy Miles
 
Blocks by Lachs Cox
Blocks by Lachs CoxBlocks by Lachs Cox
Blocks by Lachs Coxlachie
 
Building Cloud Castles
Building Cloud CastlesBuilding Cloud Castles
Building Cloud CastlesBen Scofield
 

Ähnlich wie Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013 (20)

Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?
Puppet Camp Duesseldorf 2014: Martin Alfke - Can you upgrade to puppet 4.x?
 
Functional Smalltalk
Functional SmalltalkFunctional Smalltalk
Functional Smalltalk
 
A Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to GoA Recovering Java Developer Learns to Go
A Recovering Java Developer Learns to Go
 
Php
PhpPhp
Php
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
 
PHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing InsanityPHP 8: Process & Fixing Insanity
PHP 8: Process & Fixing Insanity
 
Dataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in RubyDataflow: Declarative concurrency in Ruby
Dataflow: Declarative concurrency in Ruby
 
Puppet Node Classifiers Talk - Patrick Buckley
Puppet Node Classifiers Talk - Patrick BuckleyPuppet Node Classifiers Talk - Patrick Buckley
Puppet Node Classifiers Talk - Patrick Buckley
 
Gun make
Gun makeGun make
Gun make
 
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101
 
What we can learn from Rebol?
What we can learn from Rebol?What we can learn from Rebol?
What we can learn from Rebol?
 
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet LabsThe Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
The Grand Puppet Sub-Systems Tour - Nicholas Fagerlund, Puppet Labs
 
Test-Driven Puppet Development - PuppetConf 2014
Test-Driven Puppet Development - PuppetConf 2014Test-Driven Puppet Development - PuppetConf 2014
Test-Driven Puppet Development - PuppetConf 2014
 
Node Boot Camp
Node Boot CampNode Boot Camp
Node Boot Camp
 
Blocks by Lachs Cox
Blocks by Lachs CoxBlocks by Lachs Cox
Blocks by Lachs Cox
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Introduction to php basics
Introduction to php   basicsIntroduction to php   basics
Introduction to php basics
 
Building Cloud Castles
Building Cloud CastlesBuilding Cloud Castles
Building Cloud Castles
 

Mehr von Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

Mehr von Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Kürzlich hochgeladen

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Kürzlich hochgeladen (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Loops and Unicorns - The Future of the Puppet Language - PuppetConf 2013

  • 2. Loops and Unicorns Future of the Puppet Language Henrik Lindberg Consulting Engineer | Puppet Labs @hel
  • 3. puppetconf.com #puppetconf •  New parser •  New Language Features •  New approach – Opt in to New/Experimental Features – Maintaining Backwards Compatibility Introduction
  • 4. New Parser The future is already here…
  • 5. puppetconf.com #puppetconf •  Rewritten from the ground up •  Removes quirky grammar constraints •  Improves error messages •  Enabler for: – opt-in to new and experimental features – backwards compatibility •  Use on command line, or in settings New Parser puppet apply –-parser future ...
  • 6. puppetconf.com #puppetconf De-Quirk "This is a random number: ${fqdn_rand()}" join([1,2,3]) $a = 0x0EH $b = 0778 Interpolation and functions work: Literal Array / Hash as argument in calls works: Numbers must now be valid:
  • 7. puppetconf.com #puppetconf Array & Hash $a = [1,2,3] $b = [4,5,6] $c = $a + $b Concatenate Arrays: Append to Array: Merge Hash: $d = $a << 4 $a = {name => 'mary'} $b = {has => 'a little lamb'} $c = $a + $b
  • 8. puppetconf.com #puppetconf Misc unless $something { . . .} else { . . . } Unless Else: Assignment is an expression: Expression separator ';' : $a = $b = 10 fqdn_rand($seed = 30) $a = $x[1][1] $a = $x[1];[1]
  • 9. puppetconf.com #puppetconf Error Reporting Error: Could not parse for environment production: Syntax error at 'node' at line 1 on node kermit.example.com puppet apply -e '$a = node "a+b" { }' Then: Now: Error: Invalid use of expression. A Node Definition does not produce a value at line 1:6 Error: The hostname 'a+b' contains illegal characters (only letters, digits, '_', '-', and '.' are allowed) at line 1:11 Error: Classes, definitions, and nodes may only appear at toplevel or inside other classes at line 1:6 Error: Could not parse for environment production: Found 3 errors. Giving up on node kermit.example.com
  • 11. puppetconf.com #puppetconf •  Forgiving Grammar •  Validation is separate – Can validate a particular language version – Language version != Puppet version •  Evaluation is separate – Can evaluate a particular language version way – Language version != Puppet version Separation of Language Concerns
  • 17. puppetconf.com #puppetconf •  Iteration & Lambdas •  Puppet Bindings •  Heredoc support •  Puppet Templates New Language Features
  • 19. puppetconf.com #puppetconf Concepts each($foo) |$x| { notice $x } The lambda: Inline call: $foo.each |$x| { notice $x } each($foo) |$x| { notice $x }
  • 20. puppetconf.com #puppetconf •  each •  select – reject •  collect •  reduce •  slice Custom functions can take a lambda! Iterating Functions
  • 21. puppetconf.com #puppetconf Each - Array $a = ['a', 'b', 'c'] $a.each |$value| { notice $value } Iterating over an array: Produces: Notice: Scope(Class[main]): a Notice: Scope(Class[main]): b Notice: Scope(Class[main]): c
  • 22. puppetconf.com #puppetconf Each – Array (with index) $a = ['a', 'b', 'c'] $a.each |$index, $value| { notice "$index = $value" } Iterating over an array – with index: Produces: Notice: Scope(Class[main]): 0 = a Notice: Scope(Class[main]): 1 = b Notice: Scope(Class[main]): 2 = c
  • 23. puppetconf.com #puppetconf Each - Hash $a = {a => 10, b => 20, c => 30} $a.each |$key, $value| { notice "$key = $value" } Iterating over a hash – with key and value: Produces: Notice: Scope(Class[main]): a = 10 Notice: Scope(Class[main]): b = 20 Notice: Scope(Class[main]): c = 30
  • 24. puppetconf.com #puppetconf Each – Hash (elements) $a = {a => 10, b => 20, c => 30} $a.each |$elem| { notice "${elem[0]} = ${elem[1]}" } Iterating over a hash elements: Produces: Notice: Scope(Class[main]): a = 10 Notice: Scope(Class[main]): b = 20 Notice: Scope(Class[main]): c = 30
  • 25. puppetconf.com #puppetconf Select / Reject $a = [1, 2, 3] notice $a.select |$value| { $v == 2 } notice $a.reject |$value| { $v == 2 } Select and Reject elements: Produces: Notice: Scope(Class[main]): 2 Notice: Scope(Class[main]): 1 3
  • 26. puppetconf.com #puppetconf Collect $a = [1, 2, 3] notice $a.collect |$value| { $v * 10 } Transform each element with collect: Produces: Notice: Scope(Class[main]): 10 20 30
  • 27. puppetconf.com #puppetconf Reduce $a = [1, 2, 3] notice $a.reduce |$memo, $value| { $memo + $value } Reduce all elements into one: Produces: Notice: Scope(Class[main]): 6
  • 28. puppetconf.com #puppetconf Examples $usernames.each |$x| { file { "/home/$x/.somerc": owner => $x } } Set ownership of some "rc-file" for each user: Setting 'owner' and 'mode' from a Hash: $users_with_mode = ['fred' => 0666, 'mary' => 0777 ] $users_with_mode.each |$user, $mode| { file {"/home/$user/.somerc": owner => $user, mode => $mode } }
  • 29. puppetconf.com #puppetconf Examples $a.select |$x| { $x =~ /com$/ }.each |$x| { file { "/somewhere/$x": owner => $x } } Filter and create resources: Include classes based on array of roles: $roles.each |$x| { include "role_$x" }
  • 30. puppetconf.com #puppetconf Custom Function (Ruby) pp_block = args[-1] Lambda always last argument: Was it given? Call it: pp_block.is_a? Puppet::Parser::AST::Lambda # in a custom function, self is scope) pp_block.call(self, 'hello', 'world')
  • 31. puppetconf.com #puppetconf •  http://links.puppetlabs.com/arm2-iteration •  http://links.puppetlabs.com/arm2-examples ARM 2 - Iteration
  • 32. Heredoc Not yet on master branch https://github.com/puppetlabs/puppet/pull/1659
  • 33. puppetconf.com #puppetconf Heredoc - Syntax @( ["]<endtag>["] [:<syntax>] [/<escapes>] ) <text> [|][-] <endtag> ENDS-­‐HERE   anything  not  in  <text>     "ENDS-­‐HERE"   with  interpola2on   :json   syntax  check  result   /tsrn$L    turns  on  escape   /      turns  on  all   |   set  le7  margin   -­‐   trim  trailing   t  tab   s  space   r  return   n  new-­‐line   $  $   L  <end  of  line>  
  • 34. puppetconf.com #puppetconf Heredoc – example Example: #.........1.........2.........3.........4.........5.... $a = @(END) This is indented 2 spaces in the source, but produces a result flush left with the initial 'T' This line is thus indented 2 spaces. | END
  • 35. puppetconf.com #puppetconf Heredoc – example multiple on same line: #.........1.........2.........3.........4.........5.... foo(@(FIRST), @(SECOND)) This is the text for the first heredoc FIRST This is the text for the second SECOND
  • 36. puppetconf.com #puppetconf For more examples and details •  http://links.puppetlabs.com/arm4-heredoc ARM-4 Heredoc
  • 37. Puppet Templates Not yet on master branch https://github.com/puppetlabs/puppet/pull/1660
  • 38. puppetconf.com #puppetconf •  Embedded Puppet (EPP) - like ERB •  Same tags §  <%, <%=, <%-, <%%, <%# §  %>,-%> •  Expressions are Puppet DSL •  Parameterized •  .epp file extension (by convention) Puppet Templates
  • 39. puppetconf.com #puppetconf Use by calling epptemplate(<name> [,<params_hash>]) inline_epptemplate(<text>[,<params_hash>]) Puppet Templates $x = 'human' inline_epptemplate('This is not the <%= $x %> you are looking for.', { 'x' => 'droid'}) # => 'This is not the droid you are looking for.'
  • 40. puppetconf.com #puppetconf •  Parameterized – declare parameters – set default values – parameter without value and no default = error Puppet Templates <%- ($x = 'human') -%> This is not the <%= $x %> you are looking for.
  • 41. puppetconf.com #puppetconf For more examples and details •  http://links.puppetlabs.com/arm3- puppet_templates ARM-3 Puppet Templates
  • 42. Puppet Bindings / Data in Modules
  • 43. puppetconf.com #puppetconf •  More powerful data bindings •  For both Data, and Puppet Extensions •  Composes Hiera2 data in modules and environment + Hiera1 •  Bindings in Ruby •  Opt in on command line or in settings Puppet Binder puppet apply --binder puppet apply –-parser future ...
  • 44. puppetconf.com #puppetconf •  Default: – All hiera-2 data (in default location) and all (default) ruby bindings from all modules on module path composed – Site level hiera-2 data and ruby bindings override contributions from modules. •  Customize – include alternatives, exclude bindings – add / reorganize overriding "layers" Configuration
  • 45. puppetconf.com #puppetconf •  Composable •  Interpolation using Puppet DSL expressions •  Changed hiera.yaml syntax (for version 2) Hiera 2
  • 46. puppetconf.com #puppetconf Minimal opt-in (in a module) --- version: 2 hiera.yaml: data/common.yaml: data/${osfamily}.yaml: --- myclass::myparam: '1.2.3' --- myclass::myparam: '2.4.6'
  • 47. puppetconf.com #puppetconf For more examples and details •  http://links.puppetlabs.com/arm8- puppet_bindings •  http://links.puppetlabs.com/arm9- data_in_modules ARM-8 & 9
  • 48.
  • 49. Thank You Henrik Lindberg Consulting Engineer | Puppet Labs @hel Collaborate. Automate. Ship.
  • 50. Follow us on Twitter @puppetlabs youtube.com/puppetlabsinc slideshare.net/puppetlabs Collaborate. Automate. Ship.