creating beautiful puppet modules with puppet-lint

Download Creating beautiful puppet modules with puppet-lint

Post on 13-Jun-2015

105 views

Category:

Technology

0 download

Embed Size (px)

DESCRIPTION

Utah County Puppet user group Meeting on 2014-Oct-21: puppet-lint

TRANSCRIPT

  • 1. Creating beautifulPuppet moduleswith pupet-lint

2. $(whoami) 3. http://spuder.github.io#spuder 4. => Packages=> Files=> Services 5. DSL?Ive got dual T1 uplinks 6. $package=openssh-serverif [`which yum`]; thenyum install $packageelif [`which apt-get`; thenapt-get install $packageelseecho Neither apt nor yum found; exit 1fi 7. $package=openssh-serverpackage { $package:ensure => present,} 8. class ssh {package {openssh-server:manifest init.ppensure => present,}file {/etc/ssh/sshd_config:content => puppet:///ssh/sshd_config',owner => root,require => Package[openssh-server],}service {sshd:ensure => running,require => [Package[openssh-server],File[/etc/ssh/ssd_}} 9. $ puppet module generate foo-bar$ mv foo-bar bar #bug PUP-3124$ tree bar/bar/ README.md files manifests init.pp metadata.json spec templates tests init.ppbar module layout 10. Name your puppetmodules 11. There are two hard things in computer science:- cache invalidation- naming things- off-by-one errors.- Phil Karlton 12. Wrapper Module => devops/ac_mysqlBase Module => puppetlabs/mysqlhttp://bit.do/wrapper-class 13. Workshop 1https://github.com/UCPUG/ucpug-presentations 14. Puppet-lint 15. $ puppet parser validate *.pp$ puppet-lint *.ppalias ppv='puppet parser validate'alias ppl='puppet lint --no-80chars-check' 16. Workshop 2https://github.com/UCPUG/ucpug-presentations 17. Questions?