├── ext ├── debian │ ├── compat │ ├── docs │ ├── source │ │ ├── format │ │ └── options │ ├── puppet-el.dirs │ ├── puppet-el.install │ ├── puppetmaster.postrm │ ├── puppetmaster-common.manpages │ ├── puppetmaster-common.install │ ├── TODO.Debian │ ├── puppet-testsuite.install │ ├── watch │ ├── puppet.default │ ├── puppetmaster-common.postinst │ ├── README.source │ ├── vim-puppet.dirs │ ├── puppet.lintian-overrides │ ├── puppetmaster-passenger.dirs │ ├── puppetmaster.lintian-overrides │ ├── vim-puppet.yaml │ ├── puppet-common.install │ ├── puppet-testsuite.lintian-overrides │ ├── puppet-el.emacsen-startup │ ├── puppet-el.emacsen-remove │ ├── puppet-common.lintian-overrides │ ├── README.Debian │ └── puppet-common.dirs ├── regexp_nodes │ ├── parameters │ │ └── service │ │ │ ├── prod │ │ │ ├── sandbox │ │ │ └── qa │ ├── classes │ │ ├── databases │ │ └── webservers │ └── environment │ │ └── development ├── vim │ ├── ftdetect │ │ └── puppet.vim │ └── README ├── redhat │ └── client.sysconfig ├── windows │ ├── eventlog │ │ ├── puppetres.dll │ │ └── puppetres.mc │ ├── service │ │ └── daemon.bat │ ├── puppet_interactive.bat │ ├── puppet_shell.bat │ └── run_puppet_interactive.bat ├── pure_ruby_dsl │ └── dsl_test.rb ├── gentoo │ └── conf.d │ │ └── puppet ├── autotest │ └── Rakefile ├── solaris │ └── pkginfo └── emacs │ └── puppet-mode-init.el ├── spec ├── fixtures │ ├── manifests │ │ └── site.pp │ ├── integration │ │ ├── node │ │ │ └── environment │ │ │ │ ├── sitedir │ │ │ │ ├── 03_empty.pp │ │ │ │ ├── 00_a.pp │ │ │ │ ├── 04_include.pp │ │ │ │ └── 01_b.pp │ │ │ │ └── sitedir2 │ │ │ │ ├── 03_c.pp │ │ │ │ ├── 00_a.pp │ │ │ │ ├── 04_include.pp │ │ │ │ └── 02_folder │ │ │ │ └── 01_b.pp │ │ └── provider │ │ │ └── cron │ │ │ └── crontab │ │ │ ├── crontab_user2 │ │ │ ├── purged │ │ │ ├── moved_cronjob_input2 │ │ │ ├── remove_named_resource │ │ │ ├── modify_entry │ │ │ └── remove_unnamed_resource │ ├── unit │ │ ├── indirector │ │ │ ├── hiera │ │ │ │ ├── invalid.yaml │ │ │ │ └── global.yaml │ │ │ └── data_binding │ │ │ │ └── hiera │ │ │ │ ├── invalid.yaml │ │ │ │ └── global.yaml │ │ ├── provider │ │ │ ├── augeas │ │ │ │ └── augeas │ │ │ │ │ └── etc │ │ │ │ │ ├── test │ │ │ │ │ └── hosts │ │ │ ├── package │ │ │ │ ├── pkgng │ │ │ │ │ ├── pkg.query │ │ │ │ │ ├── pkg.query_absent │ │ │ │ │ ├── pkg.version │ │ │ │ │ └── pkg.info │ │ │ │ ├── openbsd │ │ │ │ │ ├── pkginfo.query │ │ │ │ │ └── pkginfo_flavors.list │ │ │ │ ├── gem │ │ │ │ │ └── gem-list-single-package │ │ │ │ ├── pkg │ │ │ │ │ ├── dummy_solaris10 │ │ │ │ │ ├── dummy_solaris11.ifo.known │ │ │ │ │ ├── incomplete │ │ │ │ │ ├── dummy_solaris11.ifo.installed │ │ │ │ │ ├── dummy_solaris11.known │ │ │ │ │ ├── dummy_solaris11.installed │ │ │ │ │ ├── solaris11 │ │ │ │ │ ├── dummy_implicit_version │ │ │ │ │ └── dummy_solaris11.certificate_warning │ │ │ │ └── zypper │ │ │ │ │ └── zypper-list-updates-empty.out │ │ │ ├── zpool │ │ │ │ └── zpool │ │ │ │ │ └── zpool-list.out │ │ │ ├── zfs │ │ │ │ └── zfs │ │ │ │ │ └── zfs-list.out │ │ │ ├── naginator │ │ │ │ └── define_empty_param │ │ │ ├── service │ │ │ │ ├── openrc │ │ │ │ │ └── rcservice_list │ │ │ │ ├── openbsd │ │ │ │ │ └── rcctl_getall │ │ │ │ └── smf │ │ │ │ │ └── svcs.out │ │ │ ├── mount │ │ │ │ └── parsed │ │ │ │ │ ├── openbsd.fstab │ │ │ │ │ ├── freebsd.mount │ │ │ │ │ ├── openbsd.mount │ │ │ │ │ ├── linux.mount │ │ │ │ │ ├── darwin.mount │ │ │ │ │ └── netbsd.mount │ │ │ ├── cron │ │ │ │ ├── parsed │ │ │ │ │ └── managed │ │ │ │ └── crontab │ │ │ │ │ └── vixie_header.txt │ │ │ └── parsedfile │ │ │ │ └── simple.txt │ │ ├── reports │ │ │ └── tagmail │ │ │ │ ├── tagmail_email.conf │ │ │ │ └── tagmail_failers.conf │ │ ├── data_providers │ │ │ └── environments │ │ │ │ ├── hiera_misc │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── environment.conf │ │ │ │ └── modules │ │ │ │ │ └── one │ │ │ │ │ └── metadata.json │ │ │ │ ├── hiera_defaults │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── data │ │ │ │ │ └── common.yaml │ │ │ │ ├── modules │ │ │ │ │ └── one │ │ │ │ │ │ ├── data │ │ │ │ │ │ └── common.yaml │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ └── metadata.json │ │ │ │ └── environment.conf │ │ │ │ ├── hiera_modules │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── modules │ │ │ │ │ ├── one │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ ├── hiera.yaml │ │ │ │ │ │ ├── data │ │ │ │ │ │ │ └── common.yaml │ │ │ │ │ │ └── metadata.json │ │ │ │ │ └── two │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ ├── data │ │ │ │ │ │ └── common.yaml │ │ │ │ │ │ ├── hiera.yaml │ │ │ │ │ │ └── metadata.json │ │ │ │ ├── data │ │ │ │ │ ├── common.yaml │ │ │ │ │ └── specific.yaml │ │ │ │ ├── environment.conf │ │ │ │ └── hiera.yaml │ │ │ │ ├── hiera_module_config │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── data │ │ │ │ │ ├── common.yaml │ │ │ │ │ └── specific.yaml │ │ │ │ ├── modules │ │ │ │ │ └── one │ │ │ │ │ │ ├── data1 │ │ │ │ │ │ ├── name.yaml │ │ │ │ │ │ ├── single.yaml │ │ │ │ │ │ ├── first.json │ │ │ │ │ │ └── second.json │ │ │ │ │ │ ├── data2 │ │ │ │ │ │ └── single.yaml │ │ │ │ │ │ ├── metadata.json │ │ │ │ │ │ └── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ ├── environment.conf │ │ │ │ └── hiera.yaml │ │ │ │ ├── hiera_env_config │ │ │ │ ├── data1 │ │ │ │ │ ├── name.yaml │ │ │ │ │ ├── single.yaml │ │ │ │ │ ├── first.json │ │ │ │ │ └── second.json │ │ │ │ ├── data2 │ │ │ │ │ └── single.yaml │ │ │ │ ├── environment.conf │ │ │ │ └── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── production │ │ │ │ ├── environment.conf │ │ │ │ ├── modules │ │ │ │ │ ├── xyz │ │ │ │ │ │ ├── functions │ │ │ │ │ │ │ └── data.pp │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ └── puppet │ │ │ │ │ │ │ └── bindings │ │ │ │ │ │ │ └── xyz │ │ │ │ │ │ │ └── default.rb │ │ │ │ │ └── abc │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ ├── functions │ │ │ │ │ │ └── abc │ │ │ │ │ │ │ └── data.rb │ │ │ │ │ │ └── bindings │ │ │ │ │ │ └── abc │ │ │ │ │ │ └── default.rb │ │ │ │ └── lib │ │ │ │ │ └── puppet │ │ │ │ │ └── functions │ │ │ │ │ └── environment │ │ │ │ │ └── data.rb │ │ │ │ ├── hiera_bad_syntax_json │ │ │ │ ├── data │ │ │ │ │ └── bad.json │ │ │ │ ├── hiera.yaml │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ └── environment.conf │ │ │ │ ├── hiera_bad_syntax_yaml │ │ │ │ ├── data │ │ │ │ │ └── bad.yaml │ │ │ │ ├── hiera.yaml │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ └── environment.conf │ │ │ │ └── sample │ │ │ │ ├── environment.conf │ │ │ │ ├── manifests │ │ │ │ └── site.pp │ │ │ │ └── modules │ │ │ │ └── dataprovider │ │ │ │ └── manifests │ │ │ │ └── init.pp │ │ ├── functions │ │ │ └── lookup │ │ │ │ └── environments │ │ │ │ └── production │ │ │ │ ├── modules │ │ │ │ ├── empty_json │ │ │ │ │ ├── data │ │ │ │ │ │ └── empty.json │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ ├── hiera.yaml │ │ │ │ │ └── metadata.json │ │ │ │ ├── empty_yaml │ │ │ │ │ ├── data │ │ │ │ │ │ └── empty.yaml │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ ├── hiera.yaml │ │ │ │ │ └── metadata.json │ │ │ │ ├── bca │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ └── bindings │ │ │ │ │ │ └── bca │ │ │ │ │ │ └── default.rb │ │ │ │ ├── bad_data │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ ├── functions │ │ │ │ │ │ └── bad_data │ │ │ │ │ │ │ └── data.rb │ │ │ │ │ │ └── bindings │ │ │ │ │ │ └── bad_data │ │ │ │ │ │ └── default.rb │ │ │ │ ├── no_provider │ │ │ │ │ └── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ ├── meta │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ └── metadata.json │ │ │ │ ├── metawcp │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ └── metadata.json │ │ │ │ ├── hieraprovider │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ ├── data │ │ │ │ │ │ └── first.json │ │ │ │ │ ├── hiera.yaml │ │ │ │ │ └── metadata.json │ │ │ │ └── abc │ │ │ │ │ ├── manifests │ │ │ │ │ └── init.pp │ │ │ │ │ └── lib │ │ │ │ │ └── puppet │ │ │ │ │ └── bindings │ │ │ │ │ └── abc │ │ │ │ │ └── default.rb │ │ │ │ └── environment.conf │ │ ├── application │ │ │ └── environments │ │ │ │ ├── production │ │ │ │ ├── manifests │ │ │ │ │ └── site.pp │ │ │ │ ├── environment.conf │ │ │ │ └── data │ │ │ │ │ └── common.yaml │ │ │ │ └── puppet_func_provider │ │ │ │ ├── manifests │ │ │ │ └── site.pp │ │ │ │ ├── environment.conf │ │ │ │ └── functions │ │ │ │ └── data.pp │ │ ├── pops │ │ │ ├── loaders │ │ │ │ └── loaders │ │ │ │ │ ├── module_no_lib │ │ │ │ │ └── modules │ │ │ │ │ │ └── modulea │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ ├── functions │ │ │ │ │ │ └── hello.pp │ │ │ │ │ │ └── metadata.json │ │ │ │ │ ├── single_module │ │ │ │ │ └── modules │ │ │ │ │ │ └── modulea │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ ├── functions │ │ │ │ │ │ ├── hello.pp │ │ │ │ │ │ └── subspace │ │ │ │ │ │ │ └── hello.pp │ │ │ │ │ │ ├── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ │ └── functions │ │ │ │ │ │ │ ├── rb_func_a.rb │ │ │ │ │ │ │ └── modulea │ │ │ │ │ │ │ └── rb_func_a.rb │ │ │ │ │ │ └── metadata.json │ │ │ │ │ ├── wo_metadata_module │ │ │ │ │ └── modules │ │ │ │ │ │ └── moduleb │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ └── functions │ │ │ │ │ │ └── moduleb │ │ │ │ │ │ └── rb_func_b.rb │ │ │ │ │ ├── dependent_modules_with_metadata │ │ │ │ │ └── modules │ │ │ │ │ │ ├── usee │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ └── zero.pp │ │ │ │ │ │ ├── functions │ │ │ │ │ │ │ └── usee_puppet.pp │ │ │ │ │ │ ├── manifests │ │ │ │ │ │ │ └── init.pp │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ └── puppet │ │ │ │ │ │ │ ├── functions │ │ │ │ │ │ │ └── usee │ │ │ │ │ │ │ │ ├── callee.rb │ │ │ │ │ │ │ │ └── usee_ruby.rb │ │ │ │ │ │ │ └── type │ │ │ │ │ │ │ └── usee_type.rb │ │ │ │ │ │ ├── user │ │ │ │ │ │ ├── types │ │ │ │ │ │ │ ├── withuseeone.pp │ │ │ │ │ │ │ └── withuseezero.pp │ │ │ │ │ │ ├── functions │ │ │ │ │ │ │ ├── puppet_calling_ruby.pp │ │ │ │ │ │ │ ├── puppet_calling_puppet.pp │ │ │ │ │ │ │ └── puppet_calling_puppet_init.pp │ │ │ │ │ │ ├── lib │ │ │ │ │ │ │ └── puppet │ │ │ │ │ │ │ │ └── functions │ │ │ │ │ │ │ │ └── user │ │ │ │ │ │ │ │ ├── ruby_calling_ruby.rb │ │ │ │ │ │ │ │ ├── caller.rb │ │ │ │ │ │ │ │ ├── ruby_calling_puppet.rb │ │ │ │ │ │ │ │ ├── caller2.rb │ │ │ │ │ │ │ │ └── ruby_calling_puppet_init.rb │ │ │ │ │ │ └── metadata.json │ │ │ │ │ │ └── usee2 │ │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ └── functions │ │ │ │ │ │ └── usee2 │ │ │ │ │ │ └── callee.rb │ │ │ │ │ └── mix_4x_and_3x_functions │ │ │ │ │ ├── user │ │ │ │ │ ├── functions │ │ │ │ │ │ ├── puppetcaller4.pp │ │ │ │ │ │ ├── puppetcalled.pp │ │ │ │ │ │ └── puppetcaller.pp │ │ │ │ │ ├── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ │ └── functions │ │ │ │ │ │ │ └── user │ │ │ │ │ │ │ ├── callingpuppet.rb │ │ │ │ │ │ │ └── caller.rb │ │ │ │ │ └── metadata.json │ │ │ │ │ └── usee │ │ │ │ │ ├── metadata.json │ │ │ │ │ └── lib │ │ │ │ │ └── puppet │ │ │ │ │ └── parser │ │ │ │ │ └── functions │ │ │ │ │ ├── callee.rb │ │ │ │ │ └── callee_ws.rb │ │ │ ├── parser │ │ │ │ └── lexer │ │ │ │ │ ├── emptyexec.pp │ │ │ │ │ ├── falsevalues.pp │ │ │ │ │ ├── simpledefaults.pp │ │ │ │ │ ├── arraytrailingcomma.pp │ │ │ │ │ ├── emptyclass.pp │ │ │ │ │ ├── emptyifelse.pp │ │ │ │ │ ├── collection_override.pp │ │ │ │ │ ├── fqdefinition.pp │ │ │ │ │ ├── funccomma.pp │ │ │ │ │ ├── tag.pp │ │ │ │ │ ├── arithmetic_expression.pp │ │ │ │ │ ├── multipleclass.pp │ │ │ │ │ ├── classpathtest.pp │ │ │ │ │ ├── multilinecomments.pp │ │ │ │ │ ├── append.pp │ │ │ │ │ ├── collection.pp │ │ │ │ │ ├── singlequote.pp │ │ │ │ │ ├── scopetest.pp │ │ │ │ │ ├── componentmetaparams.pp │ │ │ │ │ ├── multipleinstances.pp │ │ │ │ │ ├── fqparents.pp │ │ │ │ │ ├── ifexpression.pp │ │ │ │ │ ├── filecreate.pp │ │ │ │ │ ├── namevartest.pp │ │ │ │ │ ├── subclass_name_duplication.pp │ │ │ │ │ ├── argumentdefaults.pp │ │ │ │ │ ├── componentrequire.pp │ │ │ │ │ ├── multisubs.pp │ │ │ │ │ ├── aliastest.pp │ │ │ │ │ ├── defineoverrides.pp │ │ │ │ │ └── classheirarchy.pp │ │ │ └── binder │ │ │ │ ├── config │ │ │ │ └── binder_config │ │ │ │ │ ├── nolayer │ │ │ │ │ └── binder_config.yaml │ │ │ │ │ └── ok │ │ │ │ │ └── binder_config.yaml │ │ │ │ └── bindings_composer │ │ │ │ └── ok │ │ │ │ ├── modules │ │ │ │ ├── good │ │ │ │ │ └── lib │ │ │ │ │ │ └── puppet │ │ │ │ │ │ └── bindings │ │ │ │ │ │ └── good │ │ │ │ │ │ └── default.rb │ │ │ │ └── bad │ │ │ │ │ └── lib │ │ │ │ │ └── puppet │ │ │ │ │ └── bindings │ │ │ │ │ └── bad │ │ │ │ │ └── default.rb │ │ │ │ ├── lib │ │ │ │ └── puppet │ │ │ │ │ └── bindings │ │ │ │ │ └── confdirtest.rb │ │ │ │ └── binder_config.yaml │ │ ├── parser │ │ │ ├── lexer │ │ │ │ ├── emptyexec.pp │ │ │ │ ├── falsevalues.pp │ │ │ │ ├── simpledefaults.pp │ │ │ │ ├── arraytrailingcomma.pp │ │ │ │ ├── emptyclass.pp │ │ │ │ ├── emptyifelse.pp │ │ │ │ ├── collection_override.pp │ │ │ │ ├── fqdefinition.pp │ │ │ │ ├── funccomma.pp │ │ │ │ ├── tag.pp │ │ │ │ ├── arithmetic_expression.pp │ │ │ │ ├── multipleclass.pp │ │ │ │ ├── classpathtest.pp │ │ │ │ ├── multilinecomments.pp │ │ │ │ ├── append.pp │ │ │ │ ├── collection.pp │ │ │ │ ├── singlequote.pp │ │ │ │ ├── scopetest.pp │ │ │ │ ├── componentmetaparams.pp │ │ │ │ ├── multipleinstances.pp │ │ │ │ ├── fqparents.pp │ │ │ │ ├── ifexpression.pp │ │ │ │ ├── filecreate.pp │ │ │ │ ├── namevartest.pp │ │ │ │ ├── subclass_name_duplication.pp │ │ │ │ ├── argumentdefaults.pp │ │ │ │ ├── componentrequire.pp │ │ │ │ ├── multisubs.pp │ │ │ │ ├── aliastest.pp │ │ │ │ ├── defineoverrides.pp │ │ │ │ └── classheirarchy.pp │ │ │ └── functions │ │ │ │ └── create_resources │ │ │ │ └── foo │ │ │ │ └── manifests │ │ │ │ ├── wrongdefine.pp │ │ │ │ └── init.pp │ │ └── util │ │ │ └── rdoc │ │ │ └── basic.pp │ ├── releases │ │ └── jamtur01-apache │ │ │ ├── tests │ │ │ ├── apache.pp │ │ │ ├── init.pp │ │ │ ├── dev.pp │ │ │ ├── php.pp │ │ │ ├── ssl.pp │ │ │ └── vhost.pp │ │ │ ├── Modulefile │ │ │ ├── manifests │ │ │ ├── php.pp │ │ │ ├── dev.pp │ │ │ └── ssl.pp │ │ │ └── lib │ │ │ └── puppet │ │ │ └── type │ │ │ └── a2mod.rb │ ├── java.tgz │ ├── stdlib.tgz │ ├── module.tar.gz │ ├── hiera.yaml │ └── faulty_face │ │ └── puppet │ │ └── face │ │ └── syntax.rb ├── unit │ ├── face_spec.rb │ ├── provider │ │ ├── README.markdown │ │ └── selmodule-example.pp │ ├── type │ │ ├── README.markdown │ │ ├── stage_spec.rb │ │ └── whit_spec.rb │ ├── face │ │ ├── catalog_spec.rb │ │ ├── module_spec.rb │ │ ├── facts_spec.rb │ │ └── file_spec.rb │ ├── indirector │ │ ├── node │ │ │ └── rest_spec.rb │ │ ├── file_content │ │ │ └── selector_spec.rb │ │ ├── file_metadata │ │ │ └── selector_spec.rb │ │ ├── catalog │ │ │ └── rest_spec.rb │ │ ├── status │ │ │ ├── rest_spec.rb │ │ │ └── local_spec.rb │ │ └── file_bucket_file │ │ │ └── rest_spec.rb │ ├── property │ │ └── ensure_spec.rb │ ├── network │ │ └── http_spec.rb │ ├── application │ │ └── config_spec.rb │ └── data_binding_spec.rb ├── lib │ ├── puppet │ │ ├── face │ │ │ ├── huzzah │ │ │ │ └── obsolete.rb │ │ │ ├── huzzah.rb │ │ │ └── 1.0.0 │ │ │ │ └── huzzah.rb │ │ └── indirector │ │ │ └── indirector_testing │ │ │ ├── memory.rb │ │ │ ├── json.rb │ │ │ └── msgpack.rb │ └── puppet_spec │ │ └── verbose.rb ├── integration │ ├── file_serving │ │ ├── content_spec.rb │ │ └── metadata_spec.rb │ ├── reports_spec.rb │ ├── provider │ │ └── mailalias │ │ │ └── aliases_spec.rb │ └── reference │ │ └── providers_spec.rb └── shared_behaviours │ └── an_indirector_face.rb ├── lib ├── puppet │ ├── pops │ │ ├── types │ │ │ └── types_meta.rb │ │ └── visitable.rb │ ├── util │ │ ├── ldap.rb │ │ ├── network_device │ │ │ ├── cisco.rb │ │ │ └── transport.rb │ │ ├── skip_tags.rb │ │ ├── libuser.rb │ │ ├── libuser.conf │ │ ├── watcher │ │ │ └── timer.rb │ │ ├── limits.rb │ │ └── rdoc │ │ │ └── parser │ │ │ └── puppet_parser_rdoc2.rb │ ├── module_tool │ │ ├── skeleton │ │ │ └── templates │ │ │ │ └── generator │ │ │ │ ├── .yardopts │ │ │ │ ├── metadata.json.erb │ │ │ │ ├── spec │ │ │ │ ├── spec_helper.rb │ │ │ │ └── classes │ │ │ │ │ └── init_spec.rb.erb │ │ │ │ ├── .gitignore │ │ │ │ └── .fixtures.yml.erb │ │ └── errors.rb │ ├── network │ │ ├── http │ │ │ ├── api │ │ │ │ ├── ca.rb │ │ │ │ ├── master.rb │ │ │ │ └── ca │ │ │ │ │ └── v1.rb │ │ │ ├── memory_response.rb │ │ │ └── response.rb │ │ └── rest_controller.rb │ ├── vendor │ │ ├── deep_merge │ │ │ ├── Gemfile │ │ │ ├── lib │ │ │ │ └── deep_merge.rb │ │ │ └── PUPPET_README.md │ │ ├── rgen │ │ │ ├── test │ │ │ │ ├── template_language_test │ │ │ │ │ ├── indentStringTestTabIndent.out │ │ │ │ │ ├── indentStringTestDefaultIndent.out │ │ │ │ │ ├── templates │ │ │ │ │ │ ├── index │ │ │ │ │ │ │ ├── c │ │ │ │ │ │ │ │ └── cmod.tpl │ │ │ │ │ │ │ └── chapter.tpl │ │ │ │ │ │ ├── no_indent_test │ │ │ │ │ │ │ ├── no_indent.tpl │ │ │ │ │ │ │ ├── sub1 │ │ │ │ │ │ │ │ └── no_indent.tpl │ │ │ │ │ │ │ ├── test3.tpl │ │ │ │ │ │ │ └── test2.tpl │ │ │ │ │ │ ├── template_resolution_test │ │ │ │ │ │ │ ├── sub1 │ │ │ │ │ │ │ │ └── sub1.tpl │ │ │ │ │ │ │ ├── test.tpl │ │ │ │ │ │ │ └── sub1.tpl │ │ │ │ │ │ ├── content │ │ │ │ │ │ │ ├── chapter.tpl │ │ │ │ │ │ │ └── author.tpl │ │ │ │ │ │ ├── callback_indent_test │ │ │ │ │ │ │ ├── b.tpl │ │ │ │ │ │ │ └── a.tpl │ │ │ │ │ │ ├── define_local_test │ │ │ │ │ │ │ ├── local.tpl │ │ │ │ │ │ │ └── test.tpl │ │ │ │ │ │ ├── evaluate_test │ │ │ │ │ │ │ └── test.tpl │ │ │ │ │ │ ├── no_backslash_r_test.tpl │ │ │ │ │ │ └── indent_string_test.tpl │ │ │ │ │ ├── expected_result2.txt │ │ │ │ │ └── expected_result3.txt │ │ │ │ ├── util │ │ │ │ │ └── file_cache_map_test │ │ │ │ │ │ └── testdir │ │ │ │ │ │ └── .gitignore │ │ │ │ ├── metamodel_roundtrip_test │ │ │ │ │ └── .gitignore │ │ │ │ ├── testmodel │ │ │ │ │ ├── ea_testmodel.eap │ │ │ │ │ └── ea_testmodel.xml │ │ │ │ ├── util_test.rb │ │ │ │ └── model_builder_test.rb │ │ │ ├── .gitignore │ │ │ └── PUPPET_README.md │ │ ├── load_pathspec.rb │ │ ├── load_semantic.rb │ │ ├── load_deep_merge.rb │ │ ├── pathspec │ │ │ ├── CHANGELOG.md │ │ │ ├── PUPPET_README.md │ │ │ └── lib │ │ │ │ └── pathspec │ │ │ │ ├── spec.rb │ │ │ │ └── regexspec.rb │ │ ├── load_rgen.rb │ │ └── semantic │ │ │ ├── spec │ │ │ └── unit │ │ │ │ └── semantic │ │ │ │ └── dependency │ │ │ │ └── source_spec.rb │ │ │ ├── PUPPET_README.md │ │ │ └── lib │ │ │ └── semantic.rb │ ├── file_serving.rb │ ├── feature │ │ ├── ssh.rb │ │ ├── msgpack.rb │ │ ├── selinux.rb │ │ ├── cfpropertylist.rb │ │ ├── external_facts.rb │ │ ├── eventlog.rb │ │ ├── zlib.rb │ │ ├── telnet.rb │ │ ├── pe_license.rb │ │ └── libuser.rb │ ├── file_bucket.rb │ ├── indirector │ │ ├── status.rb │ │ ├── certificate_status.rb │ │ ├── errors.rb │ │ ├── resource_type.rb │ │ ├── file_content.rb │ │ ├── file_metadata.rb │ │ ├── code.rb │ │ ├── data_binding │ │ │ ├── hiera.rb │ │ │ └── none.rb │ │ ├── key │ │ │ └── memory.rb │ │ ├── catalog │ │ │ ├── rest.rb │ │ │ ├── json.rb │ │ │ ├── msgpack.rb │ │ │ └── store_configs.rb │ │ ├── none.rb │ │ ├── node │ │ │ ├── rest.rb │ │ │ ├── store_configs.rb │ │ │ └── msgpack.rb │ │ ├── certificate_request │ │ │ ├── memory.rb │ │ │ ├── file.rb │ │ │ └── rest.rb │ │ ├── file_bucket_file │ │ │ └── rest.rb │ │ ├── resource_type │ │ │ └── rest.rb │ │ ├── certificate │ │ │ ├── file.rb │ │ │ └── ca.rb │ │ ├── envelope.rb │ │ ├── file_content │ │ │ ├── file.rb │ │ │ ├── file_server.rb │ │ │ └── rest.rb │ │ ├── plain.rb │ │ ├── certificate_revocation_list │ │ │ ├── file.rb │ │ │ ├── ca.rb │ │ │ └── rest.rb │ │ ├── file_metadata │ │ │ ├── file_server.rb │ │ │ ├── file.rb │ │ │ └── rest.rb │ │ ├── status │ │ │ ├── rest.rb │ │ │ └── local.rb │ │ ├── facts │ │ │ └── store_configs.rb │ │ ├── resource │ │ │ └── validator.rb │ │ └── report │ │ │ ├── yaml.rb │ │ │ └── msgpack.rb │ ├── network.rb │ ├── syntax_checkers.rb │ ├── type │ │ ├── nagios_host.rb │ │ ├── nagios_command.rb │ │ ├── nagios_contact.rb │ │ ├── nagios_service.rb │ │ ├── nagios_hostextinfo.rb │ │ ├── nagios_hostgroup.rb │ │ ├── nagios_timeperiod.rb │ │ ├── nagios_contactgroup.rb │ │ ├── nagios_servicegroup.rb │ │ ├── nagios_hostdependency.rb │ │ ├── nagios_hostescalation.rb │ │ ├── nagios_serviceextinfo.rb │ │ ├── nagios_servicedependency.rb │ │ └── nagios_serviceescalation.rb │ ├── application │ │ ├── man.rb │ │ ├── plugin.rb │ │ ├── config.rb │ │ ├── help.rb │ │ ├── module.rb │ │ ├── file.rb │ │ ├── key.rb │ │ ├── node.rb │ │ ├── facts.rb │ │ ├── report.rb │ │ ├── status.rb │ │ ├── catalog.rb │ │ ├── epp.rb │ │ ├── indirection_base.rb │ │ ├── parser.rb │ │ ├── ca.rb │ │ └── resource_type.rb │ ├── parser │ │ ├── yaml_trimmer.rb │ │ ├── ast │ │ │ ├── top_level_construct.rb │ │ │ └── resource_instance.rb │ │ └── functions │ │ │ ├── md5.rb │ │ │ ├── sha1.rb │ │ │ ├── fail.rb │ │ │ ├── tag.rb │ │ │ └── digest.rb │ ├── property │ │ └── boolean.rb │ ├── resource │ │ └── type_collection_helper.rb │ ├── external │ │ ├── nagios │ │ │ └── makefile │ │ └── pson │ │ │ └── version.rb │ ├── settings │ │ ├── string_setting.rb │ │ ├── path_setting.rb │ │ ├── directory_setting.rb │ │ ├── errors.rb │ │ ├── terminus_setting.rb │ │ └── array_setting.rb │ ├── scheduler │ │ └── timer.rb │ ├── info_service.rb │ ├── plugins.rb │ ├── provider │ │ ├── confine.rb │ │ └── cisco.rb │ ├── functions │ │ └── import.rb │ ├── reports │ │ └── log.rb │ ├── graph.rb │ └── ssl.rb └── puppet_x.rb ├── .hound.yml ├── benchmarks ├── catalog_memory │ ├── site.pp.erb │ ├── puppet.conf.erb │ └── description ├── empty_catalog │ ├── site.pp.erb │ ├── puppet.conf.erb │ └── description ├── evaluations │ ├── module │ │ └── init.pp.erb │ ├── manifests │ │ ├── var_relative.pp │ │ ├── var_absolute.pp │ │ ├── fcall_3x.pp │ │ ├── fcall_4x.pp │ │ └── interpolation.pp │ ├── puppet.conf.erb │ └── site.pp.erb ├── fq_var_lookup │ ├── site.pp.erb │ ├── description │ ├── puppet.conf.erb │ └── module │ │ └── params.pp.erb ├── many_modules │ ├── site.pp.erb │ ├── module │ │ ├── init.pp.erb │ │ └── internal.pp.erb │ ├── description │ └── puppet.conf.erb ├── defined_types │ ├── module │ │ └── testing.pp.erb │ ├── description │ ├── puppet.conf.erb │ └── site.pp.erb ├── missing_type_caching │ ├── module │ │ └── testmodule.pp.erb │ ├── site.pp.erb │ ├── description │ └── puppet.conf.erb ├── many_environments │ └── description ├── system_startup │ └── description ├── function_loading │ ├── site.pp.erb │ ├── module │ │ ├── function.erb │ │ └── init.pp.erb │ ├── puppet.conf.erb │ └── env_function.erb ├── virtual_collection │ ├── description │ ├── puppet.conf.erb │ └── site.pp.erb └── type_inference │ ├── description │ └── puppet.conf.erb ├── acceptance ├── tests │ ├── external_ca_support │ │ └── fixtures │ │ │ ├── agent-ca │ │ │ └── serial │ │ │ ├── root │ │ │ ├── serial │ │ │ └── inventory.txt │ │ │ └── master-ca │ │ │ └── serial │ ├── puppet_master_help_should_mention_puppet_master.rb │ ├── doc │ │ ├── should_print_function_reference.rb │ │ └── ticket_4120_cannot_generate_type_reference.rb │ ├── puppet_apply_should_show_a_notice.rb │ ├── ticket_3656_requiring_multiple_resources.rb │ ├── ticket_17458_puppet_command_prints_help.rb │ ├── apply │ │ ├── puppet_apply_trace.rb │ │ └── classes │ │ │ ├── should_include_resources_from_class.rb │ │ │ └── should_not_auto_include_resources_from_class.rb │ └── modules │ │ └── list │ │ └── with_no_installed_modules.rb ├── lib │ ├── helper.rb │ └── acceptance_spec_helper.rb ├── setup │ ├── aio │ │ └── pre-suite │ │ │ ├── 015_PackageHostsPresets.rb │ │ │ └── 045_EnsureMasterStartedOnPassenger.rb │ ├── common │ │ └── pre-suite │ │ │ ├── 110_SetPEPuppetService.rb │ │ │ ├── 040_ValidateSignCert.rb │ │ │ ├── 025_StopFirewall.rb │ │ │ └── 000-delete-puppet-when-none.rb │ ├── pe │ │ └── pre-suite │ │ │ └── 000_Install.rb │ └── git │ │ └── pre-suite │ │ └── 020_PuppetUserAndGroup.rb ├── config │ └── gem │ │ └── options.rb └── .gitignore ├── .noexec.yaml ├── examples └── hiera │ ├── etc │ ├── puppet.conf │ ├── hieradb │ │ ├── development.yaml │ │ ├── common.yaml │ │ └── dc1.yaml │ └── hiera.yaml │ ├── site.pp │ └── modules │ ├── users │ └── manifests │ │ ├── dc1.pp │ │ ├── common.pp │ │ └── development.pp │ ├── ntp │ ├── templates │ │ └── ntp.conf.erb │ └── manifests │ │ ├── data.pp │ │ └── config.pp │ └── data │ └── manifests │ └── common.pp ├── autotest ├── images │ ├── fail.png │ ├── pass.png │ └── pending.png └── discover.rb ├── bin └── puppet ├── man └── man8 │ └── puppet.8 └── .yardopts /ext/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /ext/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /spec/fixtures/manifests/site.pp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/puppet/pops/types/types_meta.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ext/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /.hound.yml: -------------------------------------------------------------------------------- 1 | ruby: 2 | config_file: .rubocop.yml 3 | -------------------------------------------------------------------------------- /ext/debian/source/options: -------------------------------------------------------------------------------- 1 | single-debian-patch 2 | -------------------------------------------------------------------------------- /ext/regexp_nodes/parameters/service/prod: -------------------------------------------------------------------------------- 1 | \d{3}$ 2 | -------------------------------------------------------------------------------- /ext/regexp_nodes/parameters/service/sandbox: -------------------------------------------------------------------------------- 1 | ^dev- 2 | -------------------------------------------------------------------------------- /benchmarks/catalog_memory/site.pp.erb: -------------------------------------------------------------------------------- 1 | notice('hello world') -------------------------------------------------------------------------------- /benchmarks/empty_catalog/site.pp.erb: -------------------------------------------------------------------------------- 1 | notice('hello world') -------------------------------------------------------------------------------- /ext/debian/puppet-el.dirs: -------------------------------------------------------------------------------- 1 | usr/share/emacs/site-lisp 2 | -------------------------------------------------------------------------------- /ext/regexp_nodes/classes/databases: -------------------------------------------------------------------------------- 1 | db\d{2} 2 | mysql 3 | -------------------------------------------------------------------------------- /benchmarks/evaluations/module/init.pp.erb: -------------------------------------------------------------------------------- 1 | # empty init (for now) -------------------------------------------------------------------------------- /ext/regexp_nodes/classes/webservers: -------------------------------------------------------------------------------- 1 | ^(web|www) 2 | leterel 3 | -------------------------------------------------------------------------------- /lib/puppet/util/ldap.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Util::Ldap 2 | end 3 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir/03_empty.pp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/unit/indirector/hiera/invalid.yaml: -------------------------------------------------------------------------------- 1 | { invalid: 2 | -------------------------------------------------------------------------------- /acceptance/tests/external_ca_support/fixtures/agent-ca/serial: -------------------------------------------------------------------------------- 1 | 08 2 | -------------------------------------------------------------------------------- /acceptance/tests/external_ca_support/fixtures/root/serial: -------------------------------------------------------------------------------- 1 | 03 2 | -------------------------------------------------------------------------------- /ext/regexp_nodes/environment/development: -------------------------------------------------------------------------------- 1 | ^dev- 2 | prod-canary 3 | -------------------------------------------------------------------------------- /ext/regexp_nodes/parameters/service/qa: -------------------------------------------------------------------------------- 1 | ^qa- 2 | ^qa2- 3 | ^qa3- 4 | -------------------------------------------------------------------------------- /spec/unit/face_spec.rb: -------------------------------------------------------------------------------- 1 | # You should look at interface_spec.rb 2 | -------------------------------------------------------------------------------- /.noexec.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude: 3 | - gem 4 | - rake 5 | - rspec 6 | -------------------------------------------------------------------------------- /acceptance/tests/external_ca_support/fixtures/master-ca/serial: -------------------------------------------------------------------------------- 1 | 06 2 | -------------------------------------------------------------------------------- /benchmarks/fq_var_lookup/site.pp.erb: -------------------------------------------------------------------------------- 1 | include tst_generate::badclass 2 | -------------------------------------------------------------------------------- /examples/hiera/etc/puppet.conf: -------------------------------------------------------------------------------- 1 | [main] 2 | modulepath = modules 3 | 4 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir2/03_c.pp: -------------------------------------------------------------------------------- 1 | $c = $a + $b -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/apache.pp: -------------------------------------------------------------------------------- 1 | include apache 2 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/init.pp: -------------------------------------------------------------------------------- 1 | include apache 2 | -------------------------------------------------------------------------------- /examples/hiera/site.pp: -------------------------------------------------------------------------------- 1 | node default { 2 | hiera_include('classes') 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/dev.pp: -------------------------------------------------------------------------------- 1 | include apache::dev 2 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/php.pp: -------------------------------------------------------------------------------- 1 | include apache::php 2 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/ssl.pp: -------------------------------------------------------------------------------- 1 | include apache::ssl 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/indirector/data_binding/hiera/invalid.yaml: -------------------------------------------------------------------------------- 1 | { invalid: 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/augeas/augeas/etc/test: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | baz 4 | -------------------------------------------------------------------------------- /acceptance/lib/helper.rb: -------------------------------------------------------------------------------- 1 | $LOAD_PATH << File.expand_path(File.dirname(__FILE__)) 2 | -------------------------------------------------------------------------------- /examples/hiera/etc/hieradb/development.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | classes: users::development 3 | -------------------------------------------------------------------------------- /ext/debian/puppet-el.install: -------------------------------------------------------------------------------- 1 | ext/emacs/puppet-mode.el usr/share/emacs/site-lisp 2 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/.yardopts: -------------------------------------------------------------------------------- 1 | --markup markdown 2 | -------------------------------------------------------------------------------- /lib/puppet/network/http/api/ca.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Network::HTTP::API::CA 2 | end 3 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir/00_a.pp: -------------------------------------------------------------------------------- 1 | class a {} 2 | $a = 10 -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir2/00_a.pp: -------------------------------------------------------------------------------- 1 | class a {} 2 | $a = 10 -------------------------------------------------------------------------------- /ext/debian/puppetmaster.postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | #DEBHELPER# 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /lib/puppet/vendor/deep_merge/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gemspec 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/reports/tagmail/tagmail_email.conf: -------------------------------------------------------------------------------- 1 | secure: user@domain.com 2 | 3 | -------------------------------------------------------------------------------- /acceptance/setup/aio/pre-suite/015_PackageHostsPresets.rb: -------------------------------------------------------------------------------- 1 | master['use-service'] = true 2 | -------------------------------------------------------------------------------- /examples/hiera/etc/hieradb/common.yaml: -------------------------------------------------------------------------------- 1 | classes: 2 | - users::common 3 | - ntp::config 4 | -------------------------------------------------------------------------------- /ext/debian/puppetmaster-common.manpages: -------------------------------------------------------------------------------- 1 | man/man8/puppet-ca.8 2 | man/man8/puppet-master.8 3 | -------------------------------------------------------------------------------- /lib/puppet/network/http/api/master.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Network::HTTP::API::Master 2 | end 3 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/indentStringTestTabIndent.out: -------------------------------------------------------------------------------- 1 | <- tab 2 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/metadata.json.erb: -------------------------------------------------------------------------------- 1 | <%= metadata.to_json %> 2 | -------------------------------------------------------------------------------- /lib/puppet/network/rest_controller.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Network::RESTController # :nodoc: 2 | end 3 | -------------------------------------------------------------------------------- /lib/puppet/vendor/load_pathspec.rb: -------------------------------------------------------------------------------- 1 | $: << File.join([File.dirname(__FILE__), "pathspec/lib"]) 2 | -------------------------------------------------------------------------------- /lib/puppet/vendor/load_semantic.rb: -------------------------------------------------------------------------------- 1 | $: << File.join([File.dirname(__FILE__), "semantic/lib"]) 2 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/Modulefile: -------------------------------------------------------------------------------- 1 | name 'jamtur01-apache' 2 | version '0.0.1' 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_misc/manifests/site.pp: -------------------------------------------------------------------------------- 1 | include one::test 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_json/data/empty.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkgng/pkg.query: -------------------------------------------------------------------------------- 1 | zsh-5.0.2 The Z shell 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkgng/pkg.query_absent: -------------------------------------------------------------------------------- 1 | pkg: No package(s) matching bash 2 | -------------------------------------------------------------------------------- /lib/puppet/file_serving.rb: -------------------------------------------------------------------------------- 1 | # Just a stub class. 2 | class Puppet::FileServing # :nodoc: 3 | end 4 | -------------------------------------------------------------------------------- /lib/puppet/util/network_device/cisco.rb: -------------------------------------------------------------------------------- 1 | 2 | module Puppet::Util::NetworkDevice::Cisco 3 | 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/load_deep_merge.rb: -------------------------------------------------------------------------------- 1 | $: << File.join([File.dirname(__FILE__), "deep_merge/lib"]) 2 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/util/file_cache_map_test/testdir/.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | fileA 3 | 4 | -------------------------------------------------------------------------------- /spec/fixtures/java.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/spec/fixtures/java.tgz -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/production/manifests/site.pp: -------------------------------------------------------------------------------- 1 | $cx = ' C from site.pp' 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/manifests/site.pp: -------------------------------------------------------------------------------- 1 | include one::test 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/manifests/site.pp: -------------------------------------------------------------------------------- 1 | include one::test 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_yaml/data/empty.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /acceptance/setup/common/pre-suite/110_SetPEPuppetService.rb: -------------------------------------------------------------------------------- 1 | master['puppetservice'] = 'pe-puppetserver' 2 | -------------------------------------------------------------------------------- /autotest/images/fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/autotest/images/fail.png -------------------------------------------------------------------------------- /autotest/images/pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/autotest/images/pass.png -------------------------------------------------------------------------------- /benchmarks/many_modules/site.pp.erb: -------------------------------------------------------------------------------- 1 | <% size.times do |i| %> 2 | include module<%= i %> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /ext/debian/puppetmaster-common.install: -------------------------------------------------------------------------------- 1 | debian/fileserver.conf etc/puppet 2 | conf/auth.conf etc/puppet 3 | -------------------------------------------------------------------------------- /lib/puppet/vendor/pathspec/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 0.0.2: Misc. Windows/regex fixes. 2 | 0.0.1: Initial version. 3 | -------------------------------------------------------------------------------- /spec/fixtures/stdlib.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/spec/fixtures/stdlib.tgz -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/production/environment.conf: -------------------------------------------------------------------------------- 1 | environment_data_provider = 'hiera' -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/manifests/site.pp: -------------------------------------------------------------------------------- 1 | include one::test 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/openbsd/pkginfo.query: -------------------------------------------------------------------------------- 1 | bash-3.1.17 GNU Bourne Again Shell 2 | -------------------------------------------------------------------------------- /autotest/images/pending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/autotest/images/pending.png -------------------------------------------------------------------------------- /benchmarks/many_modules/module/init.pp.erb: -------------------------------------------------------------------------------- 1 | class <%= name %> { 2 | class { "<%= name %>::internal": } 3 | } 4 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/metamodel_roundtrip_test/.gitignore: -------------------------------------------------------------------------------- 1 | using_builtin_types_serialized.ecore 2 | 3 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/indentStringTestDefaultIndent.out: -------------------------------------------------------------------------------- 1 | <- your default here 2 | -------------------------------------------------------------------------------- /spec/fixtures/module.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/spec/fixtures/module.tar.gz -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/puppet_func_provider/manifests/site.pp: -------------------------------------------------------------------------------- 1 | $cx = 'C from site.pp' 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/bca/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class bca { 2 | } 3 | -------------------------------------------------------------------------------- /lib/puppet/feature/ssh.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | Puppet.features.add(:ssh, :libs => %{net/ssh}) 4 | -------------------------------------------------------------------------------- /lib/puppet/file_bucket.rb: -------------------------------------------------------------------------------- 1 | # stub 2 | module Puppet::FileBucket 3 | class BucketError < RuntimeError; end 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/deep_merge/lib/deep_merge.rb: -------------------------------------------------------------------------------- 1 | require 'deep_merge/core' 2 | require 'deep_merge/deep_merge_hash' 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class modulea { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class modulea { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/gem/gem-list-single-package: -------------------------------------------------------------------------------- 1 | 2 | *** REMOTE GEMS *** 3 | 4 | bundler (1.6.2) 5 | -------------------------------------------------------------------------------- /ext/debian/TODO.Debian: -------------------------------------------------------------------------------- 1 | * clean up initscripts per http://mail.madstop.com/pipermail/puppet-dev/2006-June/001069.html 2 | -------------------------------------------------------------------------------- /ext/debian/puppet-testsuite.install: -------------------------------------------------------------------------------- 1 | spec/* /usr/share/puppet-testsuite/spec 2 | Rakefile /usr/share/puppet-testsuite/ 3 | -------------------------------------------------------------------------------- /ext/debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/puppet .*/puppet-(.*).tar.gz 3 | -------------------------------------------------------------------------------- /ext/vim/ftdetect/puppet.vim: -------------------------------------------------------------------------------- 1 | " detect puppet filetype 2 | au BufRead,BufNewFile *.pp set filetype=puppet 3 | -------------------------------------------------------------------------------- /lib/puppet/indirector/status.rb: -------------------------------------------------------------------------------- 1 | # A stub class, so our constants work. 2 | class Puppet::Indirector::Status 3 | end 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class one($local={}) { 2 | } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class bad_data { 2 | } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/emptyexec.pp: -------------------------------------------------------------------------------- 1 | exec { "touch /tmp/emptyexectest": 2 | path => "/usr/bin:/bin" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/wo_metadata_module/modules/moduleb/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class moduleb { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/reports/tagmail/tagmail_failers.conf: -------------------------------------------------------------------------------- 1 | tag: 2 | : abuse@domain.com 3 | invalid!tag: abuse@domain.com 4 | -------------------------------------------------------------------------------- /benchmarks/many_modules/module/internal.pp.erb: -------------------------------------------------------------------------------- 1 | class <%= name %>::internal { 2 | notify { "<%= name %>::internal": } 3 | } 4 | -------------------------------------------------------------------------------- /examples/hiera/modules/users/manifests/dc1.pp: -------------------------------------------------------------------------------- 1 | # notifies 2 | class users::dc1 { 3 | notify{'Adding users::dc1': } 4 | } 5 | -------------------------------------------------------------------------------- /ext/redhat/client.sysconfig: -------------------------------------------------------------------------------- 1 | # You may specify parameters to the puppet client here 2 | #PUPPET_EXTRA_OPTS=--waitforcert=500 3 | -------------------------------------------------------------------------------- /ext/windows/eventlog/puppetres.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/ext/windows/eventlog/puppetres.dll -------------------------------------------------------------------------------- /lib/puppet/feature/msgpack.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | Puppet.features.add(:msgpack, :libs => ["msgpack"]) 4 | -------------------------------------------------------------------------------- /lib/puppet/feature/selinux.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | Puppet.features.add(:selinux, :libs => ["selinux"]) 4 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'puppetlabs_spec_helper/module_spec_helper' 2 | -------------------------------------------------------------------------------- /lib/puppet/network.rb: -------------------------------------------------------------------------------- 1 | # Just a stub, so we can correctly scope other classes. 2 | module Puppet::Network # :nodoc: 3 | end 4 | -------------------------------------------------------------------------------- /lib/puppet/syntax_checkers.rb: -------------------------------------------------------------------------------- 1 | # A name space for syntax checkers provided by Puppet. 2 | module Puppet::SyntaxCheckers 3 | end -------------------------------------------------------------------------------- /lib/puppet/vendor/load_rgen.rb: -------------------------------------------------------------------------------- 1 | $: << File.join([File.dirname(__FILE__), "rgen/lib"]) 2 | require 'puppet/vendor/rgen_patch' 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/puppet_func_provider/environment.conf: -------------------------------------------------------------------------------- 1 | environment_data_provider = 'function' 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_json/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class empty_json { 2 | } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_yaml/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class empty_yaml { 2 | } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/no_provider/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class no_provider { 2 | } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/falsevalues.pp: -------------------------------------------------------------------------------- 1 | $value = false 2 | 3 | file { "/tmp/falsevalues$value": ensure => file } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/emptyexec.pp: -------------------------------------------------------------------------------- 1 | exec { "touch /tmp/emptyexectest": 2 | path => "/usr/bin:/bin" 3 | } 4 | -------------------------------------------------------------------------------- /benchmarks/defined_types/module/testing.pp.erb: -------------------------------------------------------------------------------- 1 | define <%= name %>::testing { 2 | notify { "in <%= name %>: $title": } 3 | } 4 | -------------------------------------------------------------------------------- /benchmarks/missing_type_caching/module/testmodule.pp.erb: -------------------------------------------------------------------------------- 1 | define testmodule { 2 | notify { "in <%= name %>: $title": } 3 | } 4 | -------------------------------------------------------------------------------- /ext/debian/puppet.default: -------------------------------------------------------------------------------- 1 | # Defaults for puppet - sourced by /etc/init.d/puppet 2 | 3 | # Startup options 4 | DAEMON_OPTS="" 5 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_host.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :host 4 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/index/c/cmod.tpl: -------------------------------------------------------------------------------- 1 | <% define 'cmod' do %>Module C is special !<% end %> -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/data1/name.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test::param_b: env data param_b is 20 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/data1/single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test::param_d: env data param_d is 40 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/data2/single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | test::param_e: env data param_e is 50 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::local: 3 | bob: 4 | name: Bob 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/types/zero.pp: -------------------------------------------------------------------------------- 1 | type Usee::Zero = Integer[0,0] 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/falsevalues.pp: -------------------------------------------------------------------------------- 1 | $value = false 2 | 3 | file { "/tmp/falsevalues$value": ensure => file } 4 | -------------------------------------------------------------------------------- /benchmarks/defined_types/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: heavy use of defined types 2 | Benchmark target: catalog compilation 3 | 4 | -------------------------------------------------------------------------------- /benchmarks/many_environments/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: many directory environments. 2 | Benchmark target: environment lookup. 3 | -------------------------------------------------------------------------------- /examples/hiera/modules/ntp/templates/ntp.conf.erb: -------------------------------------------------------------------------------- 1 | <% [ntpservers].flatten.each do |server| -%> 2 | server <%= server %> 3 | <% end -%> 4 | -------------------------------------------------------------------------------- /examples/hiera/modules/users/manifests/common.pp: -------------------------------------------------------------------------------- 1 | # notifies 2 | class users::common { 3 | notify{'Adding users::common': } 4 | } 5 | -------------------------------------------------------------------------------- /ext/debian/puppetmaster-common.postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | rm -f /etc/init.d/puppetqd 6 | rm -f /etc/default/puppetqd 7 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_status.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector' 2 | 3 | class Puppet::Indirector::CertificateStatus 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_command.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :command 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_contact.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :contact 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_service.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :service 4 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir/04_include.pp: -------------------------------------------------------------------------------- 1 | include a, b 2 | notify { "variables": message => "a: $a, b: $b" } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::test::param_c: env data param_c is 300 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | users::local: 3 | bob: 4 | name: Bob 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/data/specific.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::local: 3 | bob: 4 | shell: /bin/zsh 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris10: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@2.5.5,5.10-0.111:20131230T130000Z installed ----- 2 | -------------------------------------------------------------------------------- /spec/unit/provider/README.markdown: -------------------------------------------------------------------------------- 1 | Provider Specs 2 | ============== 3 | 4 | Define specs for your providers under this directory. 5 | -------------------------------------------------------------------------------- /spec/unit/provider/selmodule-example.pp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/spec/unit/provider/selmodule-example.pp -------------------------------------------------------------------------------- /benchmarks/missing_type_caching/site.pp.erb: -------------------------------------------------------------------------------- 1 | if true { 2 | <% size.times do |i| %> 3 | testmodule { "foo<%= i %>": } 4 | <% end %> 5 | } 6 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_hostextinfo.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :hostextinfo 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_hostgroup.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :hostgroup 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_timeperiod.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :timeperiod 4 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir2/04_include.pp: -------------------------------------------------------------------------------- 1 | include a, b 2 | notify { "variables": message => "a: $a, b: $b c: $c" } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/data1/first.json: -------------------------------------------------------------------------------- 1 | { 2 | "test::param_a": "env data param_a is 10" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/data1/second.json: -------------------------------------------------------------------------------- 1 | { 2 | "test::param_c": "env data param_c is 30" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class two($arg=[]) { 2 | include one 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/environment.conf: -------------------------------------------------------------------------------- 1 | environment_timeout = 0 2 | environment_data_provider = 'function' -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/functions/create_resources/foo/manifests/wrongdefine.pp: -------------------------------------------------------------------------------- 1 | define foo::wrongdefine($one){ 2 | $foo = $one, 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris11.ifo.known: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@1.0.6,5.11-0.175.0.0.0.2.537:20131230T130000Z --- 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/incomplete: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@2.5.5,5.11-0.111:20131230T130000Z installed ---- RANDOM_TRASH 2 | -------------------------------------------------------------------------------- /spec/unit/type/README.markdown: -------------------------------------------------------------------------------- 1 | Resource Type Specs 2 | =================== 3 | 4 | Define specs for your resource types in this directory. 5 | -------------------------------------------------------------------------------- /benchmarks/system_startup/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: running puppet commands from the CLI 2 | Benchmark target: overhead of loading puppet 3 | -------------------------------------------------------------------------------- /ext/windows/service/daemon.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | 4 | call "%~dp0..\bin\environment.bat" %0 %* 5 | 6 | ruby -rubygems "%~dp0daemon.rb" %* -------------------------------------------------------------------------------- /lib/puppet/feature/cfpropertylist.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | Puppet.features.add(:cfpropertylist, :libs => ['cfpropertylist']) 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_contactgroup.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :contactgroup 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_servicegroup.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :servicegroup 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/data/bad.json: -------------------------------------------------------------------------------- 1 | { 2 | "test::param_a": "env data param_a is 10", 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_yaml/data/bad.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | { 3 | one::test::param_c: env data param_c is 300 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/data/specific.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | users::local: 3 | bob: 4 | shell: /bin/zsh 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/name.yaml: -------------------------------------------------------------------------------- 1 | one::test::param_b: module data param_b is 200 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/environment.conf: -------------------------------------------------------------------------------- 1 | environment_timeout = 0 2 | environment_data_provider = 'function' 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/meta/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class meta { 2 | $result = lookup(*$args) 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/simpledefaults.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | File { mode => '0755' } 4 | 5 | file { "/tmp/defaulttest": ensure => file } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris11.ifo.installed: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@1.0.6,5.11-0.175.0.0.0.2.537:20131230T130000Z i-- 2 | -------------------------------------------------------------------------------- /benchmarks/evaluations/manifests/var_relative.pp: -------------------------------------------------------------------------------- 1 | $tmp = [$x, $x, $x, $x, $x, $x, $x, $x, $x, $x, 2 | $x, $x, $x, $x, $x, $x, $x, $x, $x, $x, 3 | ] 4 | -------------------------------------------------------------------------------- /benchmarks/many_modules/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: many manifests spread across many modules. 2 | Benchmark target: catalog compilation. 3 | 4 | -------------------------------------------------------------------------------- /examples/hiera/etc/hieradb/dc1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ntpservers: 3 | - ntp1.dc1.example.com 4 | - ntp2.dc1.example.com 5 | classes: 6 | - users::dc1 7 | -------------------------------------------------------------------------------- /examples/hiera/modules/users/manifests/development.pp: -------------------------------------------------------------------------------- 1 | # notifies 2 | class users::development { 3 | notify{'Adding users::development': } 4 | } 5 | -------------------------------------------------------------------------------- /lib/puppet/application/man.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | 3 | class Puppet::Application::Man < Puppet::Application::FaceBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/plugin.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | class Puppet::Application::Plugin < Puppet::Application::FaceBase 3 | end 4 | -------------------------------------------------------------------------------- /lib/puppet/indirector/errors.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/error' 2 | 3 | module Puppet::Indirector 4 | class ValidationError < Puppet::Error; end 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_hostdependency.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :hostdependency 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_hostescalation.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :hostescalation 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_serviceextinfo.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :serviceextinfo 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/modules/one/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::test::param_a: module data param_a is 100 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/metawcp/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class metawcp { 2 | $result = lookup(*$args) 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/types/withuseeone.pp: -------------------------------------------------------------------------------- 1 | type User::WithUseeOne = Array[Usee::One] 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/functions/hello.pp: -------------------------------------------------------------------------------- 1 | function modulea::hello() { 2 | "modulea::hello()" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/functions/hello.pp: -------------------------------------------------------------------------------- 1 | function modulea::hello() { 2 | "modulea::hello()" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/simpledefaults.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | File { mode => '0755' } 4 | 5 | file { "/tmp/defaulttest": ensure => file } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris11.known: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@1.0.6,5.11-0.175.0.0.0.2.537:20131230T130000Z known u---- 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/zpool/zpool/zpool-list.out: -------------------------------------------------------------------------------- 1 | rpool 19.9G 7.19G 12.7G 36% ONLINE - 2 | mypool 19.9G 7.19G 12.7G 36% ONLINE - 3 | -------------------------------------------------------------------------------- /benchmarks/function_loading/site.pp.erb: -------------------------------------------------------------------------------- 1 | environment::f<%= function_count() - 1 %>() 2 | <% size.times do |i| %>include module<%= i %> 3 | <% end %> 4 | 5 | -------------------------------------------------------------------------------- /benchmarks/missing_type_caching/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: heavy use of defined types found in init.pp 2 | Benchmark target: catalog compilation 3 | 4 | -------------------------------------------------------------------------------- /ext/debian/README.source: -------------------------------------------------------------------------------- 1 | The debian directory is now maintained on Alioth in git. 2 | See https://pkg-puppet.alioth.debian.org/ for more information. 3 | -------------------------------------------------------------------------------- /lib/puppet/application/config.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | 3 | class Puppet::Application::Config < Puppet::Application::FaceBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/help.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | 3 | class Puppet::Application::Help < Puppet::Application::FaceBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/module.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | 3 | class Puppet::Application::Module < Puppet::Application::FaceBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/feature/external_facts.rb: -------------------------------------------------------------------------------- 1 | require 'facter' 2 | 3 | Puppet.features.add(:external_facts) { 4 | Facter.respond_to?(:search_external) 5 | } 6 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_servicedependency.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :servicedependency 4 | -------------------------------------------------------------------------------- /lib/puppet/type/nagios_serviceescalation.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/nagios_maker' 2 | 3 | Puppet::Util::NagiosMaker.create_nagios_type :serviceescalation 4 | -------------------------------------------------------------------------------- /lib/puppet/util/network_device/transport.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/network_device' 2 | 3 | # stub 4 | module Puppet::Util::NetworkDevice::Transport 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/manifests/php.pp: -------------------------------------------------------------------------------- 1 | class apache::php{ 2 | package{'libapache2-mod-php5': 3 | ensure => present, 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/tests/vhost.pp: -------------------------------------------------------------------------------- 1 | include apache 2 | apache::vhost { 'test.vhost': source => 'puppet:///modules/apache/test.vhost' } 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::test::param_d: module data param_d is 400 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data2/single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | one::test::param_e: module data param_e is 500 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/arraytrailingcomma.pp: -------------------------------------------------------------------------------- 1 | file { 2 | ["/tmp/arraytrailingcomma1","/tmp/arraytrailingcomma2", ]: content => "tmp" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/emptyclass.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define component { 4 | } 5 | 6 | class testing { 7 | } 8 | 9 | include testing 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/types/withuseezero.pp: -------------------------------------------------------------------------------- 1 | type User::WithUseeZero = Array[Usee::Zero] 2 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcaller4.pp: -------------------------------------------------------------------------------- 1 | function user::puppetcaller4 { 2 | user::caller() 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris11.installed: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@1.0.6,5.11-0.175.0.0.0.2.537:20131230T130000Z installed u---- 2 | -------------------------------------------------------------------------------- /benchmarks/fq_var_lookup/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: many qualified variable lookups without leading ::. 2 | Benchmark target: catalog compilation. 3 | 4 | -------------------------------------------------------------------------------- /benchmarks/many_modules/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | -------------------------------------------------------------------------------- /benchmarks/virtual_collection/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: heavy use of virtual collection 2 | Benchmark target: catalog compilation 3 | Parser: Future 4 | 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "bad" 5 | :backend: json 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_yaml/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "bad" 5 | :backend: yaml 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/emptyifelse.pp: -------------------------------------------------------------------------------- 1 | 2 | if false { 3 | } else { 4 | # nothing here 5 | } 6 | 7 | if true { 8 | # still nothing 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/arraytrailingcomma.pp: -------------------------------------------------------------------------------- 1 | file { 2 | ["/tmp/arraytrailingcomma1","/tmp/arraytrailingcomma2", ]: content => "tmp" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/emptyclass.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define component { 4 | } 5 | 6 | class testing { 7 | } 8 | 9 | include testing 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/zypper/zypper-list-updates-empty.out: -------------------------------------------------------------------------------- 1 | Loading repository data... 2 | Reading installed packages... 3 | No updates found. 4 | -------------------------------------------------------------------------------- /autotest/discover.rb: -------------------------------------------------------------------------------- 1 | require 'autotest' 2 | 3 | Autotest.add_discovery do 4 | "rspec" 5 | end 6 | 7 | Autotest.add_discovery do 8 | "puppet" 9 | end 10 | -------------------------------------------------------------------------------- /benchmarks/defined_types/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | -------------------------------------------------------------------------------- /benchmarks/defined_types/site.pp.erb: -------------------------------------------------------------------------------- 1 | <% size.times do |i| %> 2 | module<%= i %>::testing { "first": } 3 | module<%= i %>::testing{ "second": } 4 | <% end %> 5 | -------------------------------------------------------------------------------- /benchmarks/fq_var_lookup/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | -------------------------------------------------------------------------------- /lib/puppet/application/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::File < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/key.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Key < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/node.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Node < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.eap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.eap -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/diracdeltas/puppet/master/lib/puppet/vendor/rgen/test/testmodel/ea_testmodel.xml -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/first.json: -------------------------------------------------------------------------------- 1 | { 2 | "one::test::param_a": "module data param_a is 100" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/second.json: -------------------------------------------------------------------------------- 1 | { 2 | "one::test::param_c": "module data param_c is 300" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | lookup_options: 3 | roles::devco::packages: 4 | merge: unique -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/sample/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=sample 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/functions/create_resources/foo/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class foo { 2 | create_resources('foo::wrongdefine', {'blah'=>{'one'=>'two'}}) 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/emptyifelse.pp: -------------------------------------------------------------------------------- 1 | 2 | if false { 3 | } else { 4 | # nothing here 5 | } 6 | 7 | if true { 8 | # still nothing 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/zfs/zfs/zfs-list.out: -------------------------------------------------------------------------------- 1 | rpool 7.75G 11.8G 32.5K /rpool 2 | rpool/ROOT 6.03G 11.8G 21K legacy 3 | -------------------------------------------------------------------------------- /benchmarks/missing_type_caching/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | -------------------------------------------------------------------------------- /ext/windows/puppet_interactive.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | echo Running Puppet agent on demand ... 4 | cd "%~dp0" 5 | call puppet.bat agent --test %* 6 | PAUSE 7 | -------------------------------------------------------------------------------- /lib/puppet/application/facts.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Facts < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/report.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Report < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/status.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Status < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/no_indent.tpl: -------------------------------------------------------------------------------- 1 | <% define 'NoIndent', :for => Object do %> 2 | <---<%nows%> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1/sub1.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Sub1', :for => Object do %> 2 | Sub1 in sub1 3 | <% end %> -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/util_test.rb: -------------------------------------------------------------------------------- 1 | $:.unshift File.dirname(__FILE__) 2 | 3 | require 'util/file_cache_map_test' 4 | require 'util/pattern_matcher_test' 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/crontab_user2: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | # Puppet Name: some_unrelevant job 4 | * * * * * /bin/true 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/manifests/site.pp: -------------------------------------------------------------------------------- 1 | class test($param_a) { 2 | notify { "$param_a": } 3 | } 4 | 5 | include test 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_yaml/manifests/site.pp: -------------------------------------------------------------------------------- 1 | class test($param_a) { 2 | notify { "$param_a": } 3 | } 4 | 5 | include test 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_misc/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "common" 5 | :backend: yaml 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "common" 5 | :backend: yaml 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_json/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: empty 5 | :backend: json 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_yaml/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: empty 5 | :backend: yaml 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/naginator/define_empty_param: -------------------------------------------------------------------------------- 1 | # fixture for the spec test for PUP-1041 2 | 3 | define host { 4 | parents 5 | use linux-server 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/openbsd/pkginfo_flavors.list: -------------------------------------------------------------------------------- 1 | bash-3.1.17-static GNU Bourne Again Shell 2 | vim-7.0.42-no_x11 vi clone, many additional features 3 | -------------------------------------------------------------------------------- /benchmarks/type_inference/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: a resource is defined with typed arguments 2 | Benchmark target: type inference overhead 3 | Parser: Future 4 | 5 | -------------------------------------------------------------------------------- /benchmarks/virtual_collection/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | 5 | -------------------------------------------------------------------------------- /ext/pure_ruby_dsl/dsl_test.rb: -------------------------------------------------------------------------------- 1 | hostclass "foobar" do 2 | notify "this is a test", "loglevel" => "warning" 3 | end 4 | 5 | node "default" do 6 | acquire "foobar" 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/application/catalog.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | class Puppet::Application::Catalog < Puppet::Application::IndirectionBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/application/epp.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | require 'puppet/face' 3 | 4 | class Puppet::Application::Epp < Puppet::Application::FaceBase 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/application/indirection_base.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | 3 | class Puppet::Application::IndirectionBase < Puppet::Application::FaceBase 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/index/chapter.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Root' do |idx, doc| %> 2 | <%= idx%> <%= title %> in <%= doc.title %> 3 | <% end %> -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/sub1/no_indent.tpl: -------------------------------------------------------------------------------- 1 | <% define 'NoIndent', :for => Object do %> 2 | <---<%nows%> 3 | <% end %> 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/production/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | a: This is A 3 | b: This is B 4 | c: "This is%{cx}" 5 | 6 | lookup_options: 7 | a: first 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/service/openrc/rcservice_list: -------------------------------------------------------------------------------- 1 | alsasound 2 | consolefont 3 | lvm-monitoring 4 | pydoc-2.7 5 | pydoc-3.2 6 | wpa_supplicant 7 | xdm 8 | xdm-setup 9 | -------------------------------------------------------------------------------- /benchmarks/fq_var_lookup/module/params.pp.erb: -------------------------------------------------------------------------------- 1 | class tst_generate::params { 2 | $basedir = '/tmp/type_collection_tst' 3 | $user = 'tstusr' 4 | $ugroup = 'tstugroup' 5 | } 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/resource_type.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/type' 2 | 3 | # A stub class, so our constants work. 4 | class Puppet::Indirector::ResourceType # :nodoc: 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/parser/yaml_trimmer.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Parser::YamlTrimmer 2 | REMOVE = [:@scope, :@source] 3 | 4 | def to_yaml_properties 5 | super - REMOVE 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/content/chapter.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Root', :for => Chapter do %> 2 | *** <%= title %> ***<%nows%> 3 | 4 | 5 | <% end %> -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/manifests/dev.pp: -------------------------------------------------------------------------------- 1 | class apache::dev { 2 | include apache::params 3 | 4 | package{$apache::params::apache_dev: ensure => installed} 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_yaml/environment.conf: -------------------------------------------------------------------------------- 1 | # Use the 'sample' env data provider (in this fixture) 2 | environment_data_provider=hiera 3 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/collection_override.pp: -------------------------------------------------------------------------------- 1 | @file { 2 | "/tmp/collection": 3 | content => "whatever" 4 | } 5 | 6 | File<| |> { 7 | mode => '0600' 8 | } 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcalled.pp: -------------------------------------------------------------------------------- 1 | function user::puppetcalled($who) { 2 | "Did you call to say you love $who?" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/functions/puppetcaller.pp: -------------------------------------------------------------------------------- 1 | function user::puppetcaller { 2 | "${callee(first)} - ${callee(second)}" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/functions/subspace/hello.pp: -------------------------------------------------------------------------------- 1 | function modulea::subspace::hello() { 2 | "modulea::subspace::hello()" 3 | } 4 | -------------------------------------------------------------------------------- /benchmarks/function_loading/module/function.erb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'<%= name %>::f<%= n %>') do 2 | def f<%= n %> 3 | '<%= name %>::f<%= n %>' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /ext/debian/vim-puppet.dirs: -------------------------------------------------------------------------------- 1 | usr/share/vim/registry 2 | usr/share/vim/addons/syntax 3 | usr/share/vim/addons/ftdetect 4 | usr/share/vim/addons/indent 5 | usr/share/vim/addons/ftplugin 6 | -------------------------------------------------------------------------------- /lib/puppet/application/parser.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | require 'puppet/face' 3 | 4 | class Puppet::Application::Parser < Puppet::Application::FaceBase 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/feature/eventlog.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | if Puppet.features.microsoft_windows? 4 | Puppet.features.add(:eventlog, :libs => %{win32/eventlog}) 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_content.rb: -------------------------------------------------------------------------------- 1 | # A stub class, so our constants work. 2 | class Puppet::Indirector::FileContent # :nodoc: 3 | end 4 | 5 | require 'puppet/file_serving/content' 6 | -------------------------------------------------------------------------------- /spec/fixtures/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :hierarchy: 3 | - %{test_suite} 4 | - spec_hiera 5 | :backends: 6 | - yaml 7 | - puppet 8 | :yaml: 9 | :datadir: './spec/fixtures' 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/collection_override.pp: -------------------------------------------------------------------------------- 1 | @file { 2 | "/tmp/collection": 3 | content => "whatever" 4 | } 5 | 6 | File<| |> { 7 | mode => '0600' 8 | } 9 | -------------------------------------------------------------------------------- /benchmarks/evaluations/manifests/var_absolute.pp: -------------------------------------------------------------------------------- 1 | $tmp = [ $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, 2 | $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, $::x, 3 | ] 4 | -------------------------------------------------------------------------------- /examples/hiera/modules/ntp/manifests/data.pp: -------------------------------------------------------------------------------- 1 | # this class will be loaded using hiera's 'puppet' backend 2 | class ntp::data { 3 | $ntpservers = ['1.pool.ntp.org', '2.pool.ntp.org'] 4 | } 5 | -------------------------------------------------------------------------------- /ext/gentoo/conf.d/puppet: -------------------------------------------------------------------------------- 1 | # Location of PID files 2 | PUPPET_PID_DIR="/var/run/puppetlabs" 3 | 4 | # You may specify other parameters to the puppet client here 5 | #PUPPET_EXTRA_OPTS="" 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_metadata.rb: -------------------------------------------------------------------------------- 1 | # A stub class, so our constants work. 2 | class Puppet::Indirector::FileMetadata # :nodoc: 3 | end 4 | 5 | require 'puppet/file_serving/metadata' 6 | -------------------------------------------------------------------------------- /acceptance/setup/pe/pre-suite/000_Install.rb: -------------------------------------------------------------------------------- 1 | test_name 'Install Puppet Enterprise' do 2 | 3 | # This installs the latest PE build, can be overridden, see API docs 4 | install_pe 5 | end 6 | -------------------------------------------------------------------------------- /benchmarks/catalog_memory/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | environment_timeout = '0' 5 | -------------------------------------------------------------------------------- /benchmarks/empty_catalog/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | environment_timeout = '0' 5 | -------------------------------------------------------------------------------- /benchmarks/type_inference/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | environment_timeout = '0' 5 | -------------------------------------------------------------------------------- /ext/debian/puppet.lintian-overrides: -------------------------------------------------------------------------------- 1 | # Man pages are automatically generated, not much to do here 2 | puppet binary: manpage-has-bad-whatis-entry 3 | puppet binary: manpage-has-errors-from-man 4 | -------------------------------------------------------------------------------- /lib/puppet/feature/zlib.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | # We want this to load if possible, but it's not automatically 4 | # required. 5 | Puppet.features.add(:zlib, :libs => %{zlib}) 6 | -------------------------------------------------------------------------------- /lib/puppet/vendor/semantic/spec/unit/semantic/dependency/source_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'semantic/dependency/source' 3 | 4 | describe Semantic::Dependency::Source do 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/fqdefinition.pp: -------------------------------------------------------------------------------- 1 | define one::two($ensure) { 2 | file { "/tmp/fqdefinition": ensure => $ensure } 3 | } 4 | 5 | one::two { "/tmp/fqdefinition": ensure => file } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/funccomma.pp: -------------------------------------------------------------------------------- 1 | @file { 2 | ["/tmp/funccomma1","/tmp/funccomma2"]: content => "1" 3 | } 4 | 5 | realize( File["/tmp/funccomma1"], File["/tmp/funccomma2"] , ) 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/functions/usee_puppet.pp: -------------------------------------------------------------------------------- 1 | function usee::usee_puppet() { 2 | "I'm the function usee::usee_puppet()" 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/openbsd.fstab: -------------------------------------------------------------------------------- 1 | /dev/wd0a / ffs rw 1 1 2 | /dev/wd0e /home ffs rw,nodev,nosuid 1 2 3 | /dev/wd0d /usr ffs rw,nodev 1 2 4 | /dev/wd0f /boot ffs rw,nodev 1 2 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/service/openbsd/rcctl_getall: -------------------------------------------------------------------------------- 1 | accounting=NO 2 | pf=YES 3 | postgresql_flags=-l /var/postgresql/logfile 4 | tftpd_flags=/tftpboot 5 | wsmoused_flags=NO 6 | xdm_flags= 7 | -------------------------------------------------------------------------------- /acceptance/setup/aio/pre-suite/045_EnsureMasterStartedOnPassenger.rb: -------------------------------------------------------------------------------- 1 | if master.graceful_restarts? 2 | on(master, puppet('resource', 'service', master['puppetservice'], "ensure=running")) 3 | end 4 | -------------------------------------------------------------------------------- /examples/hiera/modules/data/manifests/common.pp: -------------------------------------------------------------------------------- 1 | # sets the common (across all puppet conf) ntp servers. 2 | class data::common { 3 | $ntpservers = ['ntp1.example.com', 'ntp2.example.com'] 4 | } 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/semantic/PUPPET_README.md: -------------------------------------------------------------------------------- 1 | Semantic 2 | ======== 3 | 4 | Semantic 0.0.1 5 | 6 | Copied from https://github.com/puppetlabs/semantic/tree/6d17d5283e0868cfc3d74d1e9d37b572e1739b6e 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_ruby.pp: -------------------------------------------------------------------------------- 1 | function user::puppet_calling_ruby() { 2 | usee::usee_ruby() 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/fqdefinition.pp: -------------------------------------------------------------------------------- 1 | define one::two($ensure) { 2 | file { "/tmp/fqdefinition": ensure => $ensure } 3 | } 4 | 5 | one::two { "/tmp/fqdefinition": ensure => file } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/funccomma.pp: -------------------------------------------------------------------------------- 1 | @file { 2 | ["/tmp/funccomma1","/tmp/funccomma2"]: content => "1" 3 | } 4 | 5 | realize( File["/tmp/funccomma1"], File["/tmp/funccomma2"] , ) 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/freebsd.mount: -------------------------------------------------------------------------------- 1 | /dev/ad0s1a on / (ufs, local, soft-updates) 2 | /dev/ad0s1d on /ghost (ufs, local, soft-updates) 3 | devfs on /dev (devfs, local, multilabel) 4 | -------------------------------------------------------------------------------- /acceptance/setup/common/pre-suite/040_ValidateSignCert.rb: -------------------------------------------------------------------------------- 1 | test_name "Validate Sign Cert" 2 | 3 | require 'puppet/acceptance/common_utils' 4 | extend Puppet::Acceptance::CAUtils 5 | 6 | initialize_ssl 7 | -------------------------------------------------------------------------------- /benchmarks/virtual_collection/site.pp.erb: -------------------------------------------------------------------------------- 1 | <% size.times do |i| %> 2 | @notify { "name<%= i %>":} 3 | <% end %> 4 | 5 | <% size.times do |i| %> 6 | Notify <| title == "name<%= i %>" |> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /ext/debian/puppetmaster-passenger.dirs: -------------------------------------------------------------------------------- 1 | usr/share/puppet/rack/puppetmasterd 2 | usr/share/puppet/rack/puppetmasterd/public 3 | usr/share/puppet/rack/puppetmasterd/tmp 4 | usr/share/puppetmaster-passenger/ 5 | -------------------------------------------------------------------------------- /lib/puppet/feature/telnet.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | Puppet.features.add :telnet do 4 | begin 5 | require 'net/telnet' 6 | rescue LoadError 7 | false 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/property/boolean.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/coercion' 2 | 3 | class Puppet::Property::Boolean < Puppet::Property 4 | def unsafe_munge(value) 5 | Puppet::Coercion.boolean(value) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/expected_result2.txt: -------------------------------------------------------------------------------- 1 | int myArray[5] = { 2 | 1, 3 | 2, 4 | 3, 5 | 4, 6 | 5 7 | }; 8 | Text from Root 9 | Text from Root 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "common" 5 | :backend: yaml 6 | - :name: "specific" 7 | :backend: yaml 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/tag.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | $variable = value 4 | 5 | tag yayness, rahness 6 | 7 | tag booness, $variable 8 | 9 | file { "/tmp/settestingness": ensure => file } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet.pp: -------------------------------------------------------------------------------- 1 | function user::puppet_calling_puppet () { 2 | usee::usee_puppet() 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /ext/autotest/Rakefile: -------------------------------------------------------------------------------- 1 | dest = File.expand_path("~/.autotest") 2 | file dest => ["config", "Rakefile"] do 3 | sh "cp config #{dest}" 4 | end 5 | 6 | task :install => dest 7 | 8 | task :default => :install 9 | -------------------------------------------------------------------------------- /ext/debian/puppetmaster.lintian-overrides: -------------------------------------------------------------------------------- 1 | # Man pages are automatically generated, not much to do here 2 | puppetmaster binary: manpage-has-bad-whatis-entry 3 | puppetmaster binary: manpage-has-errors-from-man 4 | -------------------------------------------------------------------------------- /ext/debian/vim-puppet.yaml: -------------------------------------------------------------------------------- 1 | addon: puppet 2 | description: "Syntax highlighting for puppet" 3 | files: 4 | - ftdetect/puppet.vim 5 | - syntax/puppet.vim 6 | - indent/puppet.vim 7 | - ftplugin/puppet.vim 8 | -------------------------------------------------------------------------------- /lib/puppet/feature/pe_license.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | 3 | #Is the pe license library installed providing the ability to read licenses. 4 | Puppet.features.add(:pe_license, :libs => %{pe_license}) 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "common" 5 | :backend: yaml 6 | - :name: "specific" 7 | :backend: yaml 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | lookup_options: 3 | one::local: 4 | merge: 5 | strategy: "deep" 6 | merge_hash_arrays: true 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/config/binder_config/nolayer/binder_config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | categories: 4 | - ['node', '$fqn'] 5 | - ['environment', '$environment'] 6 | - ['common', 'true'] 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/tag.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | $variable = value 4 | 5 | tag yayness, rahness 6 | 7 | tag booness, $variable 8 | 9 | file { "/tmp/settestingness": ensure => file } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/solaris11: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy/dummy@3.0,5.11-0.175.0.0.0.2.537:20131230T130000Z i-- 2 | pkg://solaris/dummy/dummy2@1.8.1.2-0.175.0.0.0.2.537:20131230T130000Z i-- 3 | -------------------------------------------------------------------------------- /benchmarks/function_loading/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | environment_timeout = 0 5 | parser = future 6 | -------------------------------------------------------------------------------- /ext/debian/puppet-common.install: -------------------------------------------------------------------------------- 1 | debian/puppet.conf etc/puppet 2 | debian/tmp/usr/bin/puppet usr/bin 3 | debian/tmp/usr/bin/extlookup2hiera usr/bin 4 | debian/tmp/usr/lib/ruby/vendor_ruby/* usr/lib/ruby/vendor_ruby 5 | -------------------------------------------------------------------------------- /ext/solaris/pkginfo: -------------------------------------------------------------------------------- 1 | PKG=CSWpuppet 2 | NAME=puppet - System Automation Framework 3 | VERSION=3.0.0 4 | CATEGORY=application 5 | VENDOR=https://projects.puppetlabs.com/projects/puppet 6 | EMAIL=info@puppetlabs.com 7 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/test.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | <% expand 'sub1::Sub1' %> 3 | <% expand 'sub1/sub1::Sub1' %> 4 | <% end %> -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet_init.pp: -------------------------------------------------------------------------------- 1 | function user::puppet_calling_puppet_init () { 2 | usee_puppet_init() 3 | } 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/rb_func_a.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:rb_func_a) do 2 | def rb_func_a() 3 | "I am rb_func_a()" 4 | end 5 | end -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/cron/parsed/managed: -------------------------------------------------------------------------------- 1 | # Puppet Name: real_job 2 | * * * * * /bin/true 3 | # Puppet Name: complex_job 4 | MAILTO=foo@example.com 5 | SHELL=/bin/sh 6 | @reboot /bin/true >> /dev/null 2>&1 7 | -------------------------------------------------------------------------------- /spec/unit/face/catalog_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'puppet/face' 4 | 5 | describe Puppet::Face[:catalog, '0.0.1'] do 6 | it "should actually have some testing..." 7 | end 8 | -------------------------------------------------------------------------------- /spec/unit/face/module_spec.rb: -------------------------------------------------------------------------------- 1 | # For face related tests, look in the spec/unit/faces/module folder. 2 | # For integration tests, which test the behavior of module, look in the 3 | # spec/unit/integration folder. 4 | -------------------------------------------------------------------------------- /acceptance/lib/acceptance_spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'fileutils' 2 | 3 | dir = File.expand_path(File.dirname(__FILE__)) 4 | $LOAD_PATH.unshift dir 5 | 6 | RSpec.configure do |config| 7 | config.mock_with :mocha 8 | end 9 | -------------------------------------------------------------------------------- /benchmarks/evaluations/puppet.conf.erb: -------------------------------------------------------------------------------- 1 | confdir = <%= location %> 2 | vardir = <%= location %> 3 | environmentpath = <%= File.join(location, 'environments') %> 4 | environment_timeout = '0' 5 | strict_variables = true 6 | -------------------------------------------------------------------------------- /benchmarks/evaluations/site.pp.erb: -------------------------------------------------------------------------------- 1 | # Common setup done once for all micro benchmarks 2 | # 3 | class testing { 4 | $param_a = 10 5 | $param_b = 20 6 | } 7 | include testing 8 | $x = 'aaaaaaaa' 9 | 10 | 11 | -------------------------------------------------------------------------------- /bin/puppet: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | begin 4 | require 'puppet/util/command_line' 5 | Puppet::Util::CommandLine.new.execute 6 | rescue LoadError => e 7 | $stderr.puts e.message 8 | exit(1) 9 | end 10 | -------------------------------------------------------------------------------- /ext/vim/README: -------------------------------------------------------------------------------- 1 | To install these files, copy them into ~/.vim, or the relevant 2 | system-wide location. To use the ftplugin and indenting, you may need 3 | to enable them with "filetype plugin indent on" in your vimrc. 4 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/b.tpl: -------------------------------------------------------------------------------- 1 | <% define 'do_callback', :for => Object do %> 2 | <%iinc%> 3 | <% expand 'a::callback' %> 4 | <%idec%> 5 | <% end %> 6 | -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/purged: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | 4 | # commend with blankline above and below 5 | 6 | 7 | # Puppet Name: only managed entry 8 | * * * * * /bin/true 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/service/smf/svcs.out: -------------------------------------------------------------------------------- 1 | legacy_run 16:19:12 lrc:/etc/rcS_d/S50sk98sol 2 | online 16:19:08 svc:/system/svc/restarter:default 3 | maintenance 16:19:13 svc:/network/cswrsyncd:default 4 | -------------------------------------------------------------------------------- /benchmarks/empty_catalog/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: an empty catalog (only one call to log a message) shows the setup time for env / compiler 2 | Benchmark target: catalog compilation overhead 3 | Parser: Future 4 | 5 | -------------------------------------------------------------------------------- /lib/puppet_x.rb: -------------------------------------------------------------------------------- 1 | # The Puppet Extensions Module. 2 | # 3 | # Submodules of this module should be named after the publisher (e.g. 'user' part of a Puppet Module name). 4 | # 5 | # @api public 6 | # 7 | module PuppetX 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/hieraprovider/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class hieraprovider { 2 | class test($param_a = "param default is 100") { 3 | notify { "$param_a": } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/code.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/terminus' 2 | 3 | # Do nothing, requiring that the back-end terminus do all 4 | # of the work. 5 | class Puppet::Indirector::Code < Puppet::Indirector::Terminus 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/indirector/data_binding/hiera.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/hiera' 2 | require 'hiera/scope' 3 | 4 | class Puppet::DataBinding::Hiera < Puppet::Indirector::Hiera 5 | desc "Retrieve data using Hiera." 6 | end 7 | 8 | -------------------------------------------------------------------------------- /lib/puppet/parser/ast/top_level_construct.rb: -------------------------------------------------------------------------------- 1 | # The base class for AST nodes representing top level things: 2 | # hostclasses, definitions, and nodes. 3 | class Puppet::Parser::AST::TopLevelConstruct < Puppet::Parser::AST 4 | end 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/hieraprovider/data/first.json: -------------------------------------------------------------------------------- 1 | { 2 | "hieraprovider::test::param_a": "module data param_a is 100", 3 | "test::param_b": "module data param_a is 100" 4 | } 5 | -------------------------------------------------------------------------------- /ext/emacs/puppet-mode-init.el: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Setup puppet-mode for autoloading 3 | ;; 4 | (autoload 'puppet-mode "puppet-mode" "Major mode for editing puppet manifests") 5 | 6 | (add-to-list 'auto-mode-alist '("\\.pp\\'" . puppet-mode)) 7 | -------------------------------------------------------------------------------- /lib/puppet/pops/visitable.rb: -------------------------------------------------------------------------------- 1 | # Visitable is a mix-in module that makes a class visitable by a Visitor 2 | module Puppet::Pops::Visitable 3 | def accept(visitor, *arguments) 4 | visitor.visit(self, *arguments) 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/resource/type_collection_helper.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/type_collection' 2 | 3 | module Puppet::Resource::TypeCollectionHelper 4 | def known_resource_types 5 | environment.known_resource_types 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input2: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | # Puppet Name: some_unrelevant job 4 | * * * * * /bin/true 5 | # Puppet Name: My daily failure 6 | @daily /bin/false 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/sample/manifests/site.pp: -------------------------------------------------------------------------------- 1 | class test($param_a = 1, $param_b = 2, $param_c = 3) { 2 | notify { "$param_a, $param_b, $param_c": } 3 | } 4 | 5 | include test 6 | include dataprovider::test 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/arithmetic_expression.pp: -------------------------------------------------------------------------------- 1 | 2 | $one = 1.30 3 | $two = 2.034e-2 4 | 5 | $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) 6 | 7 | 8 | notice("result is $result == 1295.87692307692") 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/good/lib/puppet/bindings/good/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('good::default') do |scope| 2 | bind { 3 | name 'the_meaning_of_life' 4 | to 300 5 | } 6 | end -------------------------------------------------------------------------------- /ext/debian/puppet-testsuite.lintian-overrides: -------------------------------------------------------------------------------- 1 | # Upstream distributes it like this 2 | puppet-testsuite binary: executable-not-elf-or-script 3 | puppet-testsuite binary: script-not-executable 4 | puppet-testsuite binary: unusual-interpreter 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/expected_result3.txt: -------------------------------------------------------------------------------- 1 | This file was created on Linux and does not contain \r before \n 2 | The next blank line is done by the "nl" command which shall only add a \n, no \r: 3 | 4 | END 5 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/sample/modules/dataprovider/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class dataprovider { 2 | class test($param_a = 1, $param_b = 2, $param_c = 3) { 3 | notify { "$param_a, $param_b, $param_c": } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/arithmetic_expression.pp: -------------------------------------------------------------------------------- 1 | 2 | $one = 1.30 3 | $two = 2.034e-2 4 | 5 | $result = ((( $two + 2) / $one) + 4 * 5.45) - (6 << 7) + (0x800 + -9) 6 | 7 | 8 | notice("result is $result == 1295.87692307692") 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/openbsd.mount: -------------------------------------------------------------------------------- 1 | /dev/wd0a on / type ffs (local) 2 | /dev/wd0e on /home type ffs (local, nodev, nosuid) 3 | /dev/wd0d on /usr type ffs (local, nodev) 4 | /dev/wd0g on /ghost type ffs (local, nodev) 5 | -------------------------------------------------------------------------------- /spec/lib/puppet/face/huzzah/obsolete.rb: -------------------------------------------------------------------------------- 1 | Puppet::Face.define(:huzzah, '1.0.0') do 2 | action :obsolete do 3 | summary "This is an action on version 1.0.0 of the face" 4 | when_invoked do |options| options end 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/lib/puppet/indirector/indirector_testing/memory.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/memory' 2 | 3 | class Puppet::IndirectorTesting::Memory < Puppet::Indirector::Memory 4 | def supports_remote_requests? 5 | true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /acceptance/config/gem/options.rb: -------------------------------------------------------------------------------- 1 | { 2 | :type => 'git', 3 | :install => [ 4 | ], 5 | :pre_suite => [ 6 | 'setup/common/pre-suite/000-delete-puppet-when-none.rb', 7 | 'setup/git/pre-suite/000_EnvSetup.rb', 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /ext/windows/puppet_shell.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL 3 | if exist "%~dp0environment.bat" ( 4 | call "%~dp0environment.bat" %0 %* 5 | ) else ( 6 | SET "PATH=%~dp0;%PATH%" 7 | ) 8 | REM Display Ruby version 9 | ruby.exe -v 10 | -------------------------------------------------------------------------------- /lib/puppet/external/nagios/makefile: -------------------------------------------------------------------------------- 1 | all: parser.rb 2 | 3 | debug: parser.rb setdebug 4 | 5 | parser.rb: grammar.ry 6 | racc -oparser.rb grammar.ry 7 | 8 | setdebug: 9 | perl -pi -e 's{\@yydebug =.*$$}{\@yydebug = true}' parser.rb 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/key/memory.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/ssl/key' 2 | require 'puppet/indirector/memory' 3 | 4 | class Puppet::SSL::Key::Memory < Puppet::Indirector::Memory 5 | desc "Store keys in memory. This is used for testing puppet." 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/util/skip_tags.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/tagging' 2 | 3 | class Puppet::Util::SkipTags 4 | include Puppet::Util::Tagging 5 | 6 | def initialize(stags) 7 | self.tags = stags unless defined?(@tags) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/vendor/semantic/lib/semantic.rb: -------------------------------------------------------------------------------- 1 | module Semantic 2 | autoload :Version, 'semantic/version' 3 | autoload :VersionRange, 'semantic/version_range' 4 | autoload :Dependency, 'semantic/dependency' 5 | 6 | VERSION = '0.0.1' 7 | end 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/multipleclass.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | file { "/tmp/multipleclassone": content => "one" } 3 | } 4 | 5 | class one { 6 | file { "/tmp/multipleclasstwo": content => "two" } 7 | } 8 | 9 | include one 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/lib/puppet/functions/modulea/rb_func_a.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'modulea::rb_func_a') do 2 | def rb_func_a() 3 | "I am modulea::rb_func_a()" 4 | end 5 | end -------------------------------------------------------------------------------- /lib/puppet/indirector/catalog/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/catalog' 2 | require 'puppet/indirector/rest' 3 | 4 | class Puppet::Resource::Catalog::Rest < Puppet::Indirector::REST 5 | desc "Find resource catalogs over HTTP via REST." 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/settings/string_setting.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Settings::StringSetting < Puppet::Settings::BaseSetting 2 | def type 3 | :string 4 | end 5 | 6 | def validate(value) 7 | value.nil? or value.is_a?(String) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/hieraprovider/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :version: 4 3 | :hierarchy: 4 | - :name: "two paths" 5 | :backend: json 6 | :paths: 7 | - "first" 8 | - "second_not_present" 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/indirector/hiera/global.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | integer: 3000 3 | string: 'apache' 4 | hash: 5 | user: 'Hightower' 6 | group: 'admin' 7 | mode: '0644' 8 | array: 9 | - '0.ntp.puppetlabs.com' 10 | - '1.ntp.puppetlabs.com' 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/multipleclass.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | file { "/tmp/multipleclassone": content => "one" } 3 | } 4 | 5 | class one { 6 | file { "/tmp/multipleclasstwo": content => "two" } 7 | } 8 | 9 | include one 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/cron/crontab/vixie_header.txt: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT THIS FILE - edit the master and reinstall. 2 | # (- installed on Thu Apr 12 12:16:01 2007) 3 | # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_implicit_version: -------------------------------------------------------------------------------- 1 | pkg://solaris/dummy@1.0,5.11-0.151006:20140220T084443Z --- 2 | pkg://solaris/dummy@1.0,5.11-0.151006:20140219T191632Z --- 3 | pkg://solaris/dummy@1.0,5.11-0.151006:20140219T191204Z --- 4 | -------------------------------------------------------------------------------- /spec/integration/file_serving/content_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/file_serving/content' 5 | 6 | describe Puppet::FileServing::Content do 7 | it_should_behave_like "a file_serving model" 8 | end 9 | -------------------------------------------------------------------------------- /spec/lib/puppet/indirector/indirector_testing/json.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector_testing' 2 | require 'puppet/indirector/json' 3 | 4 | class Puppet::IndirectorTesting::JSON < Puppet::Indirector::JSON 5 | desc "Testing the JSON indirector" 6 | end 7 | -------------------------------------------------------------------------------- /benchmarks/function_loading/env_function.erb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'environment::f<%= n %>') do 2 | def f<%= n %> 3 | <% if n > 0 %>call_function(:'environment::f<%= n-1 %>')<% else %>'environment::f<%= n %>'<% end %> 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/vendor/pathspec/PUPPET_README.md: -------------------------------------------------------------------------------- 1 | Pathspec-ruby - Gitignore parsing in Ruby 2 | ============================================= 3 | 4 | Pathspec-ruby version 0.0.2 5 | 6 | Copied from https://github.com/highb/pathspec-ruby/releases/tag/0.0.2 7 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/.gitignore: -------------------------------------------------------------------------------- 1 | .eprj 2 | test/metamodel_roundtrip_test/TestModel_Regenerated.rb 3 | test/metamodel_roundtrip_test/houseMetamodel_Regenerated.ecore 4 | test/model_builder/ecore_internal.rb 5 | test/testmodel/ea_testmodel_regenerated.xml 6 | -------------------------------------------------------------------------------- /spec/unit/face/facts_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'puppet/face' 4 | 5 | describe Puppet::Face[:facts, '0.0.1'] do 6 | describe "#find" do 7 | it { is_expected.to be_action :find } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /acceptance/.gitignore: -------------------------------------------------------------------------------- 1 | .vagrant 2 | local_options.rb 3 | pl-puppet-build.repo 4 | pl-puppet-repos.rpm 5 | repos.tar 6 | repo-configs 7 | log 8 | id_rsa-acceptance 9 | id_rsa-acceptance.pub 10 | preserved_config.yaml 11 | merged_options.rb 12 | tmp 13 | -------------------------------------------------------------------------------- /lib/puppet/indirector/catalog/json.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/catalog' 2 | require 'puppet/indirector/json' 3 | 4 | class Puppet::Resource::Catalog::Json < Puppet::Indirector::JSON 5 | desc "Store catalogs as flat files, serialized using JSON." 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/parser/functions/md5.rb: -------------------------------------------------------------------------------- 1 | require 'digest/md5' 2 | 3 | Puppet::Parser::Functions::newfunction(:md5, :type => :rvalue, :arity => 1, :doc => "Returns a MD5 hash value from a provided string.") do |args| 4 | Digest::MD5.hexdigest(args[0]) 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/classpathtest.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define mytype { 4 | file { "/tmp/classtest": ensure => file, mode => '0755' } 5 | } 6 | 7 | class testing { 8 | mytype { "componentname": } 9 | } 10 | 11 | include testing 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/multilinecomments.pp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | file { 4 | "/tmp/multilinecomments": content => "pouet" 5 | } 6 | */ 7 | 8 | /* and another one for #2333, the whitespace after the 9 | end comment is here on purpose */ 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/manifests/init.pp: -------------------------------------------------------------------------------- 1 | function usee_puppet_init() { 2 | "I'm the function usee::usee_puppet_init()" 3 | } 4 | 5 | type Usee::One = Integer[1,1] 6 | 7 | class usee { 8 | } 9 | -------------------------------------------------------------------------------- /examples/hiera/etc/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | :backends: 3 | - yaml 4 | - puppet 5 | 6 | :hierarchy: 7 | - "%{location}" 8 | - "%{environment}" 9 | - common 10 | 11 | :yaml: 12 | :datadir: etc/hieradb 13 | 14 | :puppet: 15 | :datasource: data 16 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/.gitignore: -------------------------------------------------------------------------------- 1 | ## MAC OS 2 | .DS_Store 3 | 4 | ## TEXTMATE 5 | *.tmproj 6 | tmtags 7 | 8 | ## EMACS 9 | *~ 10 | \#* 11 | .\#* 12 | 13 | ## VIM 14 | *.swp 15 | tags 16 | 17 | ## Yard gem 18 | .yardoc 19 | -------------------------------------------------------------------------------- /lib/puppet/parser/functions/sha1.rb: -------------------------------------------------------------------------------- 1 | require 'digest/sha1' 2 | 3 | Puppet::Parser::Functions::newfunction(:sha1, :type => :rvalue, :arity => 1, :doc => "Returns a SHA1 hash value from a provided string.") do |args| 4 | Digest::SHA1.hexdigest(args[0]) 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/scheduler/timer.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Scheduler 2 | class Timer 3 | def wait_for(seconds) 4 | if seconds > 0 5 | sleep(seconds) 6 | end 7 | end 8 | 9 | def now 10 | Time.now 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /lib/puppet/vendor/pathspec/lib/pathspec/spec.rb: -------------------------------------------------------------------------------- 1 | class Spec 2 | attr_reader :regex 3 | 4 | def initialize(*_) 5 | end 6 | 7 | def match(files) 8 | raise "Unimplemented" 9 | end 10 | 11 | def inclusive? 12 | true 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/PUPPET_README.md: -------------------------------------------------------------------------------- 1 | RGen - Ruby Modelling and Generator Framework 2 | ============================================= 3 | 4 | RGen version 0.7.0 5 | 6 | Copied from https://github.com/mthiede/rgen/tree/3e3c42a470269982ef52972bed82d65f78de496c 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_env_config/manifests/site.pp: -------------------------------------------------------------------------------- 1 | class test($param_a = 1, $param_b = 2, $param_c = 3, $param_d = 4, $param_e = 5) { 2 | notify { "$param_a, $param_b, $param_c, $param_d, $param_e": } 3 | } 4 | 5 | include test 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp: -------------------------------------------------------------------------------- 1 | function xyz::data { 2 | { 'xyz::def::test1' => 'module_test1', 3 | 'xyz::def::test2' => 'module_test2', 4 | 'xyz::def::test3' => 'module_test3' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/indirector/data_binding/hiera/global.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | integer: 3000 3 | string: 'apache' 4 | hash: 5 | user: 'Hightower' 6 | group: 'admin' 7 | mode: '0644' 8 | array: 9 | - '0.ntp.puppetlabs.com' 10 | - '1.ntp.puppetlabs.com' 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/callee.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'usee::callee') do 2 | def callee(value) 3 | "usee::callee() was told '#{value}'" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/classpathtest.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define mytype { 4 | file { "/tmp/classtest": ensure => file, mode => '0755' } 5 | } 6 | 7 | class testing { 8 | mytype { "componentname": } 9 | } 10 | 11 | include testing 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/multilinecomments.pp: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | file { 4 | "/tmp/multilinecomments": content => "pouet" 5 | } 6 | */ 7 | 8 | /* and another one for #2333, the whitespace after the 9 | end comment is here on purpose */ 10 | 11 | -------------------------------------------------------------------------------- /acceptance/setup/common/pre-suite/025_StopFirewall.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/acceptance/install_utils' 2 | 3 | extend Puppet::Acceptance::InstallUtils 4 | 5 | test_name "Stop firewall" do 6 | hosts.each do |host| 7 | stop_firewall_on(host) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /acceptance/tests/puppet_master_help_should_mention_puppet_master.rb: -------------------------------------------------------------------------------- 1 | test_name "puppet master help should mention puppet master" 2 | on master, puppet_master('--help') do 3 | fail_test "puppet master wasn't mentioned" unless stdout.include? 'puppet master' 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/indirector/none.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/terminus' 2 | 3 | # A none terminus type, meant to always return nil 4 | class Puppet::Indirector::None < Puppet::Indirector::Terminus 5 | def find(request) 6 | return nil 7 | end 8 | end 9 | 10 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/.fixtures.yml.erb: -------------------------------------------------------------------------------- 1 | fixtures: 2 | repositories: 3 | stdlib: 4 | repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git' 5 | ref: '4.1.0' 6 | symlinks: 7 | <%= metadata.name %>: "#{source_dir}" 8 | -------------------------------------------------------------------------------- /lib/puppet/parser/functions/fail.rb: -------------------------------------------------------------------------------- 1 | Puppet::Parser::Functions::newfunction(:fail, :arity => -1, :doc => "Fail with a parse error.") do |vals| 2 | vals = vals.collect { |s| s.to_s }.join(" ") if vals.is_a? Array 3 | raise Puppet::ParseError, vals.to_s 4 | end 5 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/local.tpl: -------------------------------------------------------------------------------- 1 | <% define 'CallLocal1', :for => Object do %> 2 | <% expand 'Local1' %> 3 | <% end %> 4 | 5 | <% define_local 'Local1', :for => Object do %> 6 | Local1 7 | <% end %> 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/append.pp: -------------------------------------------------------------------------------- 1 | $var=['/tmp/file1','/tmp/file2'] 2 | 3 | class arraytest { 4 | $var += ['/tmp/file3', '/tmp/file4'] 5 | file { 6 | $var: 7 | content => "test" 8 | } 9 | } 10 | 11 | include arraytest 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/collection.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | @file { "/tmp/colltest1": content => "one" } 3 | @file { "/tmp/colltest2": content => "two" } 4 | } 5 | 6 | class two { 7 | File <| content == "one" |> 8 | } 9 | 10 | include one, two 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/singlequote.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { "/tmp/singlequote1": 4 | ensure => file, 5 | content => 'a $quote' 6 | } 7 | 8 | file { "/tmp/singlequote2": 9 | ensure => file, 10 | content => 'some "\yayness\"' 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee2/lib/puppet/functions/usee2/callee.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'usee2::callee') do 2 | def callee(value) 3 | "usee2::callee() was told '#{value}'" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-usee", 3 | "author": "test", 4 | "description": "", 5 | "license": "", 6 | "source": "", 7 | "version": "1.0.0", 8 | "dependencies": [] 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/lib/puppet/functions/user/callingpuppet.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::callingpuppet') do 2 | def callingpuppet() 3 | call_function('user::puppetcalled', 'me') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/integration/file_serving/metadata_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/file_serving/metadata' 5 | 6 | describe Puppet::FileServing::Metadata do 7 | it_should_behave_like "a file_serving model" 8 | end 9 | 10 | -------------------------------------------------------------------------------- /spec/lib/puppet/indirector/indirector_testing/msgpack.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector_testing' 2 | require 'puppet/indirector/msgpack' 3 | 4 | class Puppet::IndirectorTesting::Msgpack < Puppet::Indirector::Msgpack 5 | desc "Testing the MessagePack indirector" 6 | end 7 | -------------------------------------------------------------------------------- /spec/shared_behaviours/an_indirector_face.rb: -------------------------------------------------------------------------------- 1 | shared_examples_for "an indirector face" do 2 | [:find, :search, :save, :destroy, :info].each do |action| 3 | it { is_expected.to be_action action } 4 | it { is_expected.to respond_to action } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/unit/type/stage_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | describe Puppet::Type.type(:stage) do 5 | it "should have a 'name' parameter'" do 6 | expect(Puppet::Type.type(:stage).new(:name => :foo)[:name]).to eq(:foo) 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /acceptance/tests/doc/should_print_function_reference.rb: -------------------------------------------------------------------------------- 1 | test_name "verify we can print the function reference" 2 | on(agents, puppet_doc("-r", "function")) do 3 | fail_test "didn't print function reference" unless 4 | stdout.include? 'Function Reference' 5 | end 6 | -------------------------------------------------------------------------------- /examples/hiera/modules/ntp/manifests/config.pp: -------------------------------------------------------------------------------- 1 | # lookup ntpservers from hiera, or allow user of class to provide other value 2 | class ntp::config($ntpservers = hiera('ntpservers')) { 3 | file{'/tmp/ntp.conf': 4 | content => template('ntp/ntp.conf.erb') 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/abc/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class abc { 2 | include 'abc::def' 3 | } 4 | 5 | class abc::def ($test1, $test2, $test3) { 6 | notify { $test1: } 7 | notify { $test2: } 8 | notify { $test3: } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class xyz { 2 | include 'xyz::def' 3 | } 4 | 5 | class xyz::def ($test1, $test2, $test3) { 6 | notify { $test1: } 7 | notify { $test2: } 8 | notify { $test3: } 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/scopetest.pp: -------------------------------------------------------------------------------- 1 | 2 | $mode = 640 3 | 4 | define thing { 5 | file { "/tmp/$name": ensure => file, mode => $mode } 6 | } 7 | 8 | class testing { 9 | $mode = 755 10 | thing {scopetest: } 11 | } 12 | 13 | include testing 14 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/usee_ruby.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'usee::usee_ruby') do 2 | def usee_ruby() 3 | "I'm the function usee::usee_ruby()" 4 | end 5 | end 6 | 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/append.pp: -------------------------------------------------------------------------------- 1 | $var=['/tmp/file1','/tmp/file2'] 2 | 3 | class arraytest { 4 | $var += ['/tmp/file3', '/tmp/file4'] 5 | file { 6 | $var: 7 | content => "test" 8 | } 9 | } 10 | 11 | include arraytest 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/collection.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | @file { "/tmp/colltest1": content => "one" } 3 | @file { "/tmp/colltest2": content => "two" } 4 | } 5 | 6 | class two { 7 | File <| content == "one" |> 8 | } 9 | 10 | include one, two 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/singlequote.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { "/tmp/singlequote1": 4 | ensure => file, 5 | content => 'a $quote' 6 | } 7 | 8 | file { "/tmp/singlequote2": 9 | ensure => file, 10 | content => 'some "\yayness\"' 11 | } 12 | -------------------------------------------------------------------------------- /spec/unit/indirector/node/rest_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/node/rest' 5 | 6 | describe Puppet::Node::Rest do 7 | before do 8 | @searcher = Puppet::Node::Rest.new 9 | end 10 | 11 | 12 | end 13 | -------------------------------------------------------------------------------- /lib/puppet/indirector/catalog/msgpack.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/catalog' 2 | require 'puppet/indirector/msgpack' 3 | 4 | class Puppet::Resource::Catalog::Msgpack < Puppet::Indirector::Msgpack 5 | desc "Store catalogs as flat files, serialized using MessagePack." 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/vendor/deep_merge/PUPPET_README.md: -------------------------------------------------------------------------------- 1 | Deep_merge - Recursive Merging for Ruby Hashes 2 | ============================================= 3 | 4 | Deep_merge 1.0.0+ 5 | 6 | Copied from https://github.com/danielsdeleo/deep_merge/tree/f9df6fdb0d0090318e8015814e68e5ca2973b493 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/componentmetaparams.pp: -------------------------------------------------------------------------------- 1 | file { "/tmp/component1": 2 | ensure => file 3 | } 4 | 5 | define thing { 6 | file { $name: ensure => file } 7 | } 8 | 9 | thing { "/tmp/component2": 10 | require => File["/tmp/component1"] 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/scopetest.pp: -------------------------------------------------------------------------------- 1 | 2 | $mode = 640 3 | 4 | define thing { 5 | file { "/tmp/$name": ensure => file, mode => $mode } 6 | } 7 | 8 | class testing { 9 | $mode = 755 10 | thing {scopetest: } 11 | } 12 | 13 | include testing 14 | -------------------------------------------------------------------------------- /benchmarks/catalog_memory/description: -------------------------------------------------------------------------------- 1 | Benchmark scenario: Runs an empty catalog and dumps the state of the memory after all runs and a diff between first and last run 2 | Benchmark target: catalog compilation memory consumption / leak 3 | Parser: Future 4 | Requires: Ruby 2.1.0 5 | 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/node/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/node' 2 | require 'puppet/indirector/rest' 3 | 4 | class Puppet::Node::Rest < Puppet::Indirector::REST 5 | desc "Get a node via REST. Puppet agent uses this to allow the puppet master 6 | to override its environment." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/skeleton/templates/generator/spec/classes/init_spec.rb.erb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | describe '<%= metadata.name %>' do 3 | 4 | context 'with default values for all parameters' do 5 | it { should contain_class('<%= metadata.name %>') } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/parser/ast/resource_instance.rb: -------------------------------------------------------------------------------- 1 | # A simple container for a parameter for an object. Consists of a 2 | # title and a set of parameters. 3 | # 4 | class Puppet::Parser::AST::ResourceInstance < Puppet::Parser::AST::Branch 5 | attr_accessor :title, :parameters 6 | end 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/multipleinstances.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { 4 | "/tmp/multipleinstancesa": ensure => file, mode => '0755'; 5 | "/tmp/multipleinstancesb": ensure => file, mode => '0755'; 6 | "/tmp/multipleinstancesc": ensure => file, mode => '0755'; 7 | } 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/type/usee_type.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:usee_type) do 2 | newparam(:name, :namevar => true) do 3 | desc 'An arbitrary name used as the identity of the resource.' 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/lib/puppet/functions/user/caller.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::caller') do 2 | def caller() 3 | call_function('callee', 'first') + ' - ' + call_function('callee', 'second') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/componentmetaparams.pp: -------------------------------------------------------------------------------- 1 | file { "/tmp/component1": 2 | ensure => file 3 | } 4 | 5 | define thing { 6 | file { $name: ensure => file } 7 | } 8 | 9 | thing { "/tmp/component2": 10 | require => File["/tmp/component1"] 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkgng/pkg.version: -------------------------------------------------------------------------------- 1 | shells/bash-completion < needs updating (index has 2.1_3) 2 | ftp/curl < needs updating (index has 7.33.0_2) 3 | shells/zsh < needs updating (index has 5.0.4) 4 | -------------------------------------------------------------------------------- /spec/fixtures/unit/util/rdoc/basic.pp: -------------------------------------------------------------------------------- 1 | # im a class 2 | class foo { 3 | file { '/tmp/foo' : 4 | ensure => present, 5 | } 6 | } 7 | 8 | # im a node 9 | node gar { 10 | } 11 | 12 | # im a define 13 | define baz { } 14 | 15 | # im a resource 16 | host { 'cow' : } 17 | -------------------------------------------------------------------------------- /spec/lib/puppet_spec/verbose.rb: -------------------------------------------------------------------------------- 1 | # Support code for running stuff with warnings disabled. 2 | module Kernel 3 | def with_verbose_disabled 4 | verbose, $VERBOSE = $VERBOSE, nil 5 | result = yield 6 | $VERBOSE = verbose 7 | return result 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /acceptance/tests/puppet_apply_should_show_a_notice.rb: -------------------------------------------------------------------------------- 1 | test_name "puppet apply should show a notice" 2 | 3 | agents.each do |host| 4 | apply_manifest_on(host, "notice 'Hello World'") do 5 | assert_match(/.*: Hello World/, stdout, "#{host}: the notice didn't show") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /acceptance/tests/ticket_3656_requiring_multiple_resources.rb: -------------------------------------------------------------------------------- 1 | test_name "#3656: requiring multiple resources" 2 | apply_manifest_on agents, %q{ 3 | notify { 'foo': } 4 | notify { 'bar': } 5 | notify { 'baz': 6 | require => [Notify['foo'], Notify['bar']], 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /lib/puppet/application/ca.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/face_base' 2 | require 'puppet/ssl/oids' 3 | 4 | class Puppet::Application::Ca < Puppet::Application::FaceBase 5 | run_mode :master 6 | 7 | def setup 8 | Puppet::SSL::Oids.register_puppet_oids 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/info_service.rb: -------------------------------------------------------------------------------- 1 | 2 | module Puppet::InfoService 3 | require 'puppet/info_service/class_information_service' 4 | def self.classes_per_environment(env_file_hash) 5 | Puppet::InfoService::ClassInformationService.new.classes_per_environment(env_file_hash) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/util/libuser.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Util::Libuser 2 | def self.getconf 3 | File.expand_path("../libuser.conf", __FILE__) 4 | end 5 | 6 | def self.getenv 7 | newenv = {} 8 | newenv['LIBUSER_CONF'] = getconf 9 | newenv 10 | end 11 | 12 | end 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_ruby.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::ruby_calling_ruby') do 2 | def ruby_calling_ruby() 3 | call_function('usee::usee_ruby') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/multipleinstances.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { 4 | "/tmp/multipleinstancesa": ensure => file, mode => '0755'; 5 | "/tmp/multipleinstancesb": ensure => file, mode => '0755'; 6 | "/tmp/multipleinstancesc": ensure => file, mode => '0755'; 7 | } 8 | -------------------------------------------------------------------------------- /ext/windows/run_puppet_interactive.bat: -------------------------------------------------------------------------------- 1 | @echo Running puppet on demand ... 2 | @echo off 3 | SETLOCAL 4 | if exist "%~dp0environment.bat" ( 5 | call "%~dp0environment.bat" %0 %* 6 | ) else ( 7 | SET "PATH=%~dp0;%PATH%" 8 | ) 9 | elevate.exe "%~dp0puppet_interactive.bat" 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/data_binding/none.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/none' 2 | 3 | class Puppet::DataBinding::None < Puppet::Indirector::None 4 | desc "A Dummy terminus that always throws :no_such_key for data lookups." 5 | def find(request) 6 | throw :no_such_key 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/model_builder_test.rb: -------------------------------------------------------------------------------- 1 | $:.unshift File.dirname(__FILE__) + "/../lib" 2 | 3 | require 'model_builder/builder_test' 4 | require 'model_builder/serializer_test' 5 | require 'model_builder/builder_context_test' 6 | require 'model_builder/reference_resolver_test' 7 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/define_local_test/test.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | <% expand 'local::CallLocal1' %> 3 | <% end %> 4 | 5 | <% define 'TestForbidden', :for => Object do %> 6 | <% expand 'local::Local1' %> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test3.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | <%iinc%> 3 | l1<% expand 'Call1' %> 4 | <%idec%> 5 | <% end %> 6 | 7 | <% define 'Call1', :for => Object do %> 8 | <--- 9 | l2 10 | <% end %> 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/modules/one/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | class test($param_a = "param default is 100", $param_b = "param default is 200", $param_c = "param default is 300") { 3 | notify { "$param_a, $param_b, $param_c": } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/fqparents.pp: -------------------------------------------------------------------------------- 1 | class base { 2 | class one { 3 | file { "/tmp/fqparent1": ensure => file } 4 | } 5 | } 6 | 7 | class two::three inherits base::one { 8 | file { "/tmp/fqparent2": ensure => file } 9 | } 10 | 11 | include two::three 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::caller') do 2 | def caller() 3 | call_function('usee::callee', 'passed value') + " + I am user::caller()" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::ruby_calling_puppet') do 2 | def ruby_calling_puppet() 3 | call_function('usee::usee_puppet') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-user", 3 | "author": "test", 4 | "description": "", 5 | "license": "", 6 | "source": "", 7 | "version": "1.0.0", 8 | "dependencies": [ 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/user/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-user", 3 | "author": "test", 4 | "description": "", 5 | "license": "", 6 | "source": "", 7 | "version": "1.0.0", 8 | "dependencies": [{ "name": "test/usee" }] 9 | } 10 | -------------------------------------------------------------------------------- /benchmarks/function_loading/module/init.pp.erb: -------------------------------------------------------------------------------- 1 | class <%= name %> { 2 | <% mc.times do |m| %> 3 | $v<%= m %> = [ 4 | <% (function_count - 1).times do |n| %> <%= name %>::f<%= n %>(), 5 | <% end %> 6 | module<%= m %>::f<%= function_count - 1 %>() 7 | ] 8 | <% end %> 9 | } 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/node/store_configs.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/store_configs' 2 | require 'puppet/node' 3 | 4 | class Puppet::Node::StoreConfigs < Puppet::Indirector::StoreConfigs 5 | 6 | desc %q{Part of the "storeconfigs" feature. Should not be directly set by end users.} 7 | 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/bindings_composer/ok/lib/puppet/bindings/confdirtest.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('confdirtest') do |scope| 2 | bind { 3 | name 'has_funny_hat' 4 | to 'the pope' 5 | } 6 | bind { 7 | name 'the_meaning_of_life' 8 | to 42 9 | } 10 | end -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller2.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::caller2') do 2 | def caller2() 3 | call_function('usee2::callee', 'passed value') + " + I am user::caller2()" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/module_no_lib/modules/modulea/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-modulea", 3 | "author": "test", 4 | "license": "", 5 | "project_page": "", 6 | "source": "", 7 | "summary": "", 8 | "version": "1.0.0", 9 | "dependencies": [] 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/single_module/modules/modulea/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-modulea", 3 | "author": "test", 4 | "license": "", 5 | "project_page": "", 6 | "source": "", 7 | "summary": "", 8 | "version": "1.0.0", 9 | "dependencies": [] 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/fqparents.pp: -------------------------------------------------------------------------------- 1 | class base { 2 | class one { 3 | file { "/tmp/fqparent1": ensure => file } 4 | } 5 | } 6 | 7 | class two::three inherits base::one { 8 | file { "/tmp/fqparent2": ensure => file } 9 | } 10 | 11 | include two::three 12 | -------------------------------------------------------------------------------- /acceptance/tests/ticket_17458_puppet_command_prints_help.rb: -------------------------------------------------------------------------------- 1 | test_name "puppet command with an unknown external command prints help" 2 | 3 | on(agents, puppet('unknown'), :acceptable_exit_codes => [1]) do 4 | assert_match(/See 'puppet help' for help on available puppet subcommands/, stdout) 5 | end 6 | -------------------------------------------------------------------------------- /lib/puppet/indirector/node/msgpack.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/node' 2 | require 'puppet/indirector/msgpack' 3 | 4 | class Puppet::Node::Msgpack < Puppet::Indirector::Msgpack 5 | desc "Store node information as flat files, serialized using MessagePack, 6 | or deserialize stored MessagePack nodes." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/plugins.rb: -------------------------------------------------------------------------------- 1 | # The Puppet Plugins module defines extension points where plugins can be configured 2 | # to add or modify puppet's behavior. See the respective classes in this module for more 3 | # details. 4 | # 5 | # @api public 6 | # @since Puppet 4.0.0 7 | # 8 | module Puppet::Plugins 9 | end -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/content/author.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Author', :for => Author do %> 2 | <% expand 'SubAuthor' %> 3 | <% end %> 4 | 5 | <% define 'SubAuthor', :for => Author do %> 6 | <%= name %>, EMail: <%= email.sub('@','(at)') %><%nows%> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/evaluate_test/test.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | <%= [1,2,3,4].collect{|n| evaluate 'Eval', :for => n}.join %> 3 | <% end %> 4 | 5 | <% define 'Eval', :for => Object do %> 6 | xx<%= this %>xx<%nows%> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/no_backslash_r_test.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | This file was created on Linux and does not contain \r before \n 3 | The next blank line is done by the "nl" command which shall only add a \n, no \r: 4 | <%nl%>END 5 | <% end %> -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/abc/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class abc { 2 | if $block != 'no_block_present' { 3 | $result = lookup(*$args) |$names| { if $block == true { $names } else { $block } } 4 | } 5 | else { 6 | $result = lookup(*$args) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ext/debian/puppet-el.emacsen-startup: -------------------------------------------------------------------------------- 1 | ;; -*-emacs-lisp-*- 2 | ;; 3 | ;; Emacs startup file for the Debian GNU/Linux puppet-el package 4 | 5 | (autoload 'puppet-mode "puppet-mode" "Major mode for editing puppet manifests") 6 | 7 | (add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode)) 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/puppet/feature/libuser.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/feature' 2 | require 'puppet/util/libuser' 3 | 4 | Puppet.features.add(:libuser) { 5 | File.executable?("/usr/sbin/lgroupadd") and 6 | File.executable?("/usr/sbin/luseradd") and 7 | Puppet::FileSystem.exist?(Puppet::Util::Libuser.getconf) 8 | } 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_request/memory.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/ssl/certificate_request' 2 | require 'puppet/indirector/memory' 3 | 4 | class Puppet::SSL::CertificateRequest::Memory < Puppet::Indirector::Memory 5 | desc "Store certificate requests in memory. This is used for testing puppet." 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_bucket_file/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/rest' 2 | require 'puppet/file_bucket/file' 3 | 4 | module Puppet::FileBucketFile 5 | class Rest < Puppet::Indirector::REST 6 | desc "This is a REST based mechanism to send/retrieve file to/from the filebucket" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/ifexpression.pp: -------------------------------------------------------------------------------- 1 | $one = 1 2 | $two = 2 3 | 4 | if ($one < $two) and (($two < 3) or ($two == 2)) { 5 | notice("True!") 6 | } 7 | 8 | if "test regex" =~ /(.*) regex/ { 9 | file { 10 | "/tmp/${1}iftest": ensure => file, mode => '0755' 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet_init.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'user::ruby_calling_puppet_init') do 2 | def ruby_calling_puppet_init() 3 | call_function('usee_puppet_init') 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/unit/type/whit_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | whit = Puppet::Type.type(:whit) 5 | 6 | describe whit do 7 | it "should stringify in a way that users will regognise" do 8 | expect(whit.new(:name => "Foo::Bar").to_s).to eq("Foo::Bar") 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /ext/debian/puppet-el.emacsen-remove: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | FLAVOR=$1 5 | PACKAGE=puppet-el 6 | ELCFILE=puppet-mode.elc 7 | 8 | if [ ${FLAVOR} != emacs ]; then 9 | echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR} 10 | rm -f /usr/share/${FLAVOR}/site-lisp/${ELCFILE} 11 | fi 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/resource_type/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/resource/type' 2 | require 'puppet/indirector/rest' 3 | require 'puppet/indirector/resource_type' 4 | 5 | class Puppet::Indirector::ResourceType::Rest < Puppet::Indirector::REST 6 | desc "Retrieve resource types via a REST HTTP interface." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/settings/path_setting.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Settings::PathSetting < Puppet::Settings::StringSetting 2 | def munge(value) 3 | if value.is_a?(String) 4 | value = value.split(File::PATH_SEPARATOR).map { |d| File.expand_path(d) }.join(File::PATH_SEPARATOR) 5 | end 6 | value 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/lib/puppet/type/a2mod.rb: -------------------------------------------------------------------------------- 1 | Puppet::Type.newtype(:a2mod) do 2 | @doc = "Manage Apache 2 modules" 3 | 4 | ensurable 5 | 6 | newparam(:name) do 7 | desc "The name of the module to be managed" 8 | 9 | isnamevar 10 | 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/bad/lib/puppet/bindings/bad/default.rb: -------------------------------------------------------------------------------- 1 | nil + nil + nil # broken on purpose, this file should never be loaded 2 | 3 | Puppet::Bindings.newbindings('bad::default') do |scope| 4 | nil + nil + nil # broken on purpose, this should never be evaluated 5 | end -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/ifexpression.pp: -------------------------------------------------------------------------------- 1 | $one = 1 2 | $two = 2 3 | 4 | if ($one < $two) and (($two < 3) or ($two == 2)) { 5 | notice("True!") 6 | } 7 | 8 | if "test regex" =~ /(.*) regex/ { 9 | file { 10 | "/tmp/${1}iftest": ensure => file, mode => '0755' 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /benchmarks/evaluations/manifests/fcall_3x.pp: -------------------------------------------------------------------------------- 1 | $tmp = [ 2 | func3(x,y), func3(x,y), func3(x,y), func3(x,y), func3(x,y), 3 | func3(x,y), func3(x,y), func3(x,y), func3(x,y), func3(x,y), 4 | func3(x,y), func3(x,y), func3(x,y), func3(x,y), func3(x,y), 5 | func3(x,y), func3(x,y), func3(x,y), func3(x,y), func3(x,y), 6 | ] 7 | -------------------------------------------------------------------------------- /benchmarks/evaluations/manifests/fcall_4x.pp: -------------------------------------------------------------------------------- 1 | $tmp = [ 2 | func4(x,y), func4(x,y), func4(x,y), func4(x,y), func4(x,y), 3 | func4(x,y), func4(x,y), func4(x,y), func4(x,y), func4(x,y), 4 | func4(x,y), func4(x,y), func4(x,y), func4(x,y), func4(x,y), 5 | func4(x,y), func4(x,y), func4(x,y), func4(x,y), func4(x,y), 6 | ] 7 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/ssl_file' 2 | require 'puppet/ssl/certificate' 3 | 4 | class Puppet::SSL::Certificate::File < Puppet::Indirector::SslFile 5 | desc "Manage SSL certificates on disk." 6 | 7 | store_in :certdir 8 | store_ca_at :localcacert 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/provider/confine.rb: -------------------------------------------------------------------------------- 1 | # Confines have been moved out of the provider as they are also used for other things. 2 | # This provides backwards compatibility for people still including this old location. 3 | require 'puppet/provider' 4 | require 'puppet/confine' 5 | 6 | Puppet::Provider::Confine = Puppet::Confine 7 | -------------------------------------------------------------------------------- /man/man8/puppet.8: -------------------------------------------------------------------------------- 1 | .\" generated with Ronn/v0.7.3 2 | .\" https://github.com/rtomayko/ronn/tree/0.7.3 3 | . 4 | .TH "PUPPET" "8" "May 2015" "Puppet Labs, LLC" "Puppet manual" 5 | . 6 | .SH "NAME" 7 | \fBpuppet\fR 8 | . 9 | .P 10 | [1;31mError: Could not parse application options: invalid option: \-\-help[0m 11 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir/01_b.pp: -------------------------------------------------------------------------------- 1 | class b {} 2 | 3 | # if the files are evaluated in the wrong order, the file 'b' has a reference 4 | # to $a (set in file 'a') and with strict variable lookup should raise an error 5 | # and fail this test. 6 | $b = $a # error if $a not set in strict mode 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/filecreate.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { 4 | "/tmp/createatest": ensure => file, mode => '0755'; 5 | "/tmp/createbtest": ensure => file, mode => '0755' 6 | } 7 | 8 | file { 9 | "/tmp/createctest": ensure => file; 10 | "/tmp/createdtest": ensure => file; 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkgng/pkg.info: -------------------------------------------------------------------------------- 1 | ca_root_nss 3.15.3.1 security/ca_root_nss 2 | curl 7.33.0 ftp/curl 3 | gnupg 2.0.22 security/gnupg 4 | mcollective 2.2.4 sysutils/mcollective 5 | nmap 6.40 security/nmap 6 | pkg 1.2.4_1 ports-mgmt/pkg 7 | zsh 5.0.2_1 shells/zsh 8 | tac_plus F4.0.4.27a net/tac_plus4 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/parsedfile/simple.txt: -------------------------------------------------------------------------------- 1 | # This is a sample fixture for the parsedfile provider. 2 | # HEADER As added by software from a third party. 3 | # Another inconspicuous comment. 4 | A generic content line with: a value. 5 | A_second_line_with_no_spaces 6 | Qexample for bug PUP-4012 7 | Another line 8 | -------------------------------------------------------------------------------- /acceptance/tests/doc/ticket_4120_cannot_generate_type_reference.rb: -------------------------------------------------------------------------------- 1 | test_name "verify we can print the function reference" 2 | confine :except, :platform => /^eos-/ 3 | 4 | on(agents, puppet_doc("-r", "type")) do 5 | fail_test "didn't print type reference" unless 6 | stdout.include? 'Type Reference' 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/functions/import.rb: -------------------------------------------------------------------------------- 1 | # The import function raises an error when called to inform the user that import is no longer supported. 2 | # 3 | Puppet::Functions.create_function(:import) do 4 | def import(*args) 5 | raise Puppet::Pops::SemanticError.new(Puppet::Pops::Issues::DISCONTINUED_IMPORT) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_request/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/ssl_file' 2 | require 'puppet/ssl/certificate_request' 3 | 4 | class Puppet::SSL::CertificateRequest::File < Puppet::Indirector::SslFile 5 | desc "Manage the collection of certificate requests on disk." 6 | 7 | store_in :requestdir 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/envelope.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector' 2 | 3 | # Provide any attributes or functionality needed for indirected 4 | # instances. 5 | module Puppet::Indirector::Envelope 6 | attr_accessor :expiration 7 | 8 | def expired? 9 | expiration and expiration < Time.now 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_content/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/content' 2 | require 'puppet/indirector/file_content' 3 | require 'puppet/indirector/direct_file_server' 4 | 5 | class Puppet::Indirector::FileContent::File < Puppet::Indirector::DirectFileServer 6 | desc "Retrieve file contents from disk." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/network/http/memory_response.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Network::HTTP::MemoryResponse 2 | attr_reader :code, :type, :body 3 | 4 | def initialize 5 | @body = "" 6 | end 7 | 8 | def respond_with(code, type, body) 9 | @code = code 10 | @type = type 11 | @body += body 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/namevartest.pp: -------------------------------------------------------------------------------- 1 | define filetest($mode, $ensure = file) { 2 | file { $name: 3 | mode => $mode, 4 | ensure => $ensure 5 | } 6 | } 7 | 8 | filetest { "/tmp/testfiletest": mode => '0644'} 9 | filetest { "/tmp/testdirtest": mode => '0755', ensure => directory} 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/filecreate.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | file { 4 | "/tmp/createatest": ensure => file, mode => '0755'; 5 | "/tmp/createbtest": ensure => file, mode => '0755' 6 | } 7 | 8 | file { 9 | "/tmp/createctest": ensure => file; 10 | "/tmp/createdtest": ensure => file; 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/package/pkg/dummy_solaris11.certificate_warning: -------------------------------------------------------------------------------- 1 | Certificate '/var/pkg/ssl/871b4ed0ade09926e6adf95f86bf17535f987684' for publisher 'solarisstudio', needed to access 'https://pkg.oracle.com/solarisstudio/release/', will expire in '29' days. 2 | pkg://solaris/dummy@1.0.6-0.175.0.0.0.2.537 i-- 3 | -------------------------------------------------------------------------------- /acceptance/tests/external_ca_support/fixtures/root/inventory.txt: -------------------------------------------------------------------------------- 1 | V 340403012536Z 01 unknown /CN=Intermediate CA (agent-ca)/emailAddress=test@example.org/O=Example Org, LLC/OU=Server Operations 2 | V 340403012537Z 02 unknown /CN=Intermediate CA (master-ca)/emailAddress=test@example.org/O=Example Org, LLC/OU=Server Operations 3 | -------------------------------------------------------------------------------- /ext/debian/puppet-common.lintian-overrides: -------------------------------------------------------------------------------- 1 | # Man pages are automatically generated, not much to do here 2 | puppet-common binary: manpage-has-bad-whatis-entry 3 | puppet-common binary: manpage-has-errors-from-man 4 | # These are "scripts" but do nothing other than providing documentation 5 | puppet-common: script-not-executable 6 | -------------------------------------------------------------------------------- /ext/windows/eventlog/puppetres.mc: -------------------------------------------------------------------------------- 1 | MessageId=0x1 2 | SymbolicName=PUPPET_INFO 3 | Language=English 4 | %1 5 | . 6 | 7 | MessageId=0x2 8 | SymbolicName=PUPPET_WARN 9 | Language=English 10 | %1 11 | . 12 | 13 | MessageId=0x3 14 | SymbolicName=PUPPET_ERROR 15 | Language=English 16 | %1 17 | . 18 | 19 | -------------------------------------------------------------------------------- /lib/puppet/indirector/catalog/store_configs.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/store_configs' 2 | require 'puppet/resource/catalog' 3 | 4 | class Puppet::Resource::Catalog::StoreConfigs < Puppet::Indirector::StoreConfigs 5 | 6 | desc %q{Part of the "storeconfigs" feature. Should not be directly set by end users.} 7 | 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/plain.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/terminus' 2 | 3 | # An empty terminus type, meant to just return empty objects. 4 | class Puppet::Indirector::Plain < Puppet::Indirector::Terminus 5 | # Just return nothing. 6 | def find(request) 7 | indirection.model.new(request.key) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/integration/node/environment/sitedir2/02_folder/01_b.pp: -------------------------------------------------------------------------------- 1 | class b {} 2 | 3 | # if the files are evaluated in the wrong order, the file 'b' has a reference 4 | # to $a (set in file 'a') and with strict variable lookup should raise an error 5 | # and fail this test. 6 | $b = $a # error if $a not set in strict mode 7 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/namevartest.pp: -------------------------------------------------------------------------------- 1 | define filetest($mode, $ensure = file) { 2 | file { $name: 3 | mode => $mode, 4 | ensure => $ensure 5 | } 6 | } 7 | 8 | filetest { "/tmp/testfiletest": mode => '0644'} 9 | filetest { "/tmp/testdirtest": mode => '0755', ensure => directory} 10 | -------------------------------------------------------------------------------- /spec/unit/property/ensure_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/property/ensure' 5 | 6 | klass = Puppet::Property::Ensure 7 | 8 | describe klass do 9 | it "should be a subclass of Property" do 10 | expect(klass.superclass).to eq(Puppet::Property) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/puppet/external/pson/version.rb: -------------------------------------------------------------------------------- 1 | module PSON 2 | # PSON version 3 | VERSION = '1.1.9' 4 | VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: 5 | VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: 6 | VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: 7 | VERSION_BUILD = VERSION_ARRAY[2] # :nodoc: 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_revocation_list/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/ssl_file' 2 | require 'puppet/ssl/certificate_revocation_list' 3 | 4 | class Puppet::SSL::CertificateRevocationList::File < Puppet::Indirector::SslFile 5 | desc "Manage the global certificate revocation list." 6 | 7 | store_at :hostcrl 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/template_resolution_test/sub1.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Sub1', :for => Object do %> 2 | Sub1 3 | <% end %> 4 | 5 | <% define 'Test', :for => Object do %> 6 | <% expand 'Sub1' %> 7 | <% expand 'sub1::Sub1' %> 8 | <% expand 'sub1/sub1::Sub1' %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Parser::Functions 2 | newfunction(:callee, :type => :rvalue, :doc => <<-EOS 3 | A function using the 3x API 4 | EOS 5 | ) do |arguments| 6 | "usee::callee() got '#{arguments[0]}'" 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/linux.mount: -------------------------------------------------------------------------------- 1 | /dev/root on / type jfs (rw,noatime) 2 | rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755) 3 | sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) 4 | /dev/sda9 on /usr/portage type jfs (rw) 5 | /dev/fake on /ghost type jfs (rw) 6 | -------------------------------------------------------------------------------- /spec/unit/network/http_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'puppet/network/http' 4 | 5 | describe Puppet::Network::HTTP do 6 | it 'defines an http_pool context' do 7 | pool = Puppet.lookup(:http_pool) 8 | expect(pool).to be_a(Puppet::Network::HTTP::NoCachePool) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate/ca.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/ssl_file' 2 | require 'puppet/ssl/certificate' 3 | 4 | class Puppet::SSL::Certificate::Ca < Puppet::Indirector::SslFile 5 | desc "Manage the CA collection of signed SSL certificates on disk." 6 | 7 | store_in :signeddir 8 | store_ca_at :cacert 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_revocation_list/ca.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/ssl_file' 2 | require 'puppet/ssl/certificate_revocation_list' 3 | 4 | class Puppet::SSL::CertificateRevocationList::Ca < Puppet::Indirector::SslFile 5 | desc "Manage the CA collection of certificate requests on disk." 6 | 7 | store_at :cacrl 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_content/file_server.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/content' 2 | require 'puppet/indirector/file_content' 3 | require 'puppet/indirector/file_server' 4 | 5 | class Puppet::Indirector::FileContent::FileServer < Puppet::Indirector::FileServer 6 | desc "Retrieve file contents using Puppet's fileserver." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/parser/functions/tag.rb: -------------------------------------------------------------------------------- 1 | # Tag the current scope with each passed name 2 | Puppet::Parser::Functions::newfunction(:tag, :arity => -2, :doc => "Add the specified tags to the containing class 3 | or definition. All contained objects will then acquire that tag, also. 4 | ") do |vals| 5 | self.resource.tag(*vals) 6 | end 7 | -------------------------------------------------------------------------------- /spec/fixtures/faulty_face/puppet/face/syntax.rb: -------------------------------------------------------------------------------- 1 | Puppet::Face.define(:syntax, '1.0.0') do 2 | action :foo do 3 | when_invoked do |whom| 4 | "hello, #{whom}" 5 | end 6 | # This 'end' is deliberately omitted, to induce a syntax error. 7 | # Please don't fix that, as it is used for testing. --daniel 2011-05-02 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/functions/abc/data.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'abc::data') do 2 | def data() 3 | { 'abc::def::test1' => 'module_test1', 4 | 'abc::def::test2' => 'module_test2', 5 | 'abc::def::test3' => 'module_test3' 6 | } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/subclass_name_duplication.pp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env puppet 2 | 3 | class one::fake { 4 | file { "/tmp/subclass_name_duplication1": ensure => present } 5 | } 6 | 7 | class two::fake { 8 | file { "/tmp/subclass_name_duplication2": ensure => present } 9 | } 10 | 11 | include one::fake, two::fake 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/config/binder_config/ok/binder_config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | layers: 4 | - {name: site, include: 'confdir:/'} 5 | - {name: modules, include: 'module:/*::test/', exclude: 'module:/bad::test/' } 6 | categories: 7 | - ['node', '$fqn'] 8 | - ['environment', '$environment'] 9 | - ['common', 'true'] -------------------------------------------------------------------------------- /spec/unit/face/file_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'puppet/face' 4 | 5 | describe Puppet::Face[:file, '0.0.1'] do 6 | [:download, :store, :find, :info, :save].each do |action| 7 | it { is_expected.to be_action action } 8 | it { is_expected.to respond_to action } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /acceptance/tests/apply/puppet_apply_trace.rb: -------------------------------------------------------------------------------- 1 | test_name 'puppet apply --trace should provide a stack trace' 2 | 3 | agents.each do |agent| 4 | on(agent, puppet('apply --trace -e "blue < 2"'), :acceptable_exit_codes => 1) do 5 | assert_match(/\.rb:\d+:in `\w+'/m, stderr, "Did not print expected stack trace on stderr") 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_metadata/file_server.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/metadata' 2 | require 'puppet/indirector/file_metadata' 3 | require 'puppet/indirector/file_server' 4 | 5 | class Puppet::Indirector::FileMetadata::FileServer < Puppet::Indirector::FileServer 6 | desc "Retrieve file metadata using Puppet's fileserver." 7 | end 8 | -------------------------------------------------------------------------------- /spec/fixtures/unit/application/environments/puppet_func_provider/functions/data.pp: -------------------------------------------------------------------------------- 1 | function environment::data() { 2 | { 3 | a => 'This is A', 4 | b => 'This is B', 5 | c => "This is ${if $cx == undef { 'C from data.pp' } else { $cx }}", 6 | lookup_options => { 7 | a => 'first' 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/wo_metadata_module/modules/moduleb/lib/puppet/functions/moduleb/rb_func_b.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'moduleb::rb_func_b') do 2 | def rb_func_b() 3 | # Should be able to call modulea::rb_func_a() 4 | call_function('modulea::rb_func_a') + " + I am moduleb::rb_func_b()" 5 | end 6 | end -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/subclass_name_duplication.pp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env puppet 2 | 3 | class one::fake { 4 | file { "/tmp/subclass_name_duplication1": ensure => present } 5 | } 6 | 7 | class two::fake { 8 | file { "/tmp/subclass_name_duplication2": ensure => present } 9 | } 10 | 11 | include one::fake, two::fake 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/status/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/status' 2 | require 'puppet/indirector/rest' 3 | 4 | class Puppet::Indirector::Status::Rest < Puppet::Indirector::REST 5 | 6 | desc "Get puppet master's status via REST. Useful because it tests the health 7 | of both the web server and the indirector." 8 | 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/util/libuser.conf: -------------------------------------------------------------------------------- 1 | [import] 2 | login_defs = /etc/login.defs 3 | default_useradd = /etc/default/useradd 4 | 5 | [defaults] 6 | crypt_style = md5 7 | modules = files shadow 8 | create_modules = files shadow 9 | 10 | [userdefaults] 11 | LU_USERNAME = %n 12 | LU_GIDNUMBER = %u 13 | 14 | [groupdefaults] 15 | LU_GROUPNAME = %n 16 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee_ws.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Parser::Functions 2 | newfunction(:callee_ws, :type => :rvalue, :doc => <<-EOS 3 | A function using the 3x API 4 | EOS 5 | ) do |arguments| 6 | "usee::callee_ws() got '#{self['passed_in_scope']}'" 7 | end 8 | end -------------------------------------------------------------------------------- /spec/unit/indirector/file_content/selector_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/file_content/selector' 5 | 6 | describe Puppet::Indirector::FileContent::Selector do 7 | include PuppetSpec::Files 8 | 9 | it_should_behave_like "Puppet::FileServing::Files", :file_content 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_metadata/file.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/metadata' 2 | require 'puppet/indirector/file_metadata' 3 | require 'puppet/indirector/direct_file_server' 4 | 5 | class Puppet::Indirector::FileMetadata::File < Puppet::Indirector::DirectFileServer 6 | desc "Retrieve file metadata directly from the local filesystem." 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/indirector/status/local.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/indirector/status' 2 | 3 | class Puppet::Indirector::Status::Local < Puppet::Indirector::Code 4 | 5 | desc "Get status locally. Only used internally." 6 | 7 | def find( *anything ) 8 | status = model.new 9 | status.version= Puppet.version 10 | status 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb: -------------------------------------------------------------------------------- 1 | require 'pathspec/spec' 2 | 3 | class RegexSpec < Spec 4 | def initialize(regex) 5 | @regex = Regexp.compile regex 6 | 7 | super 8 | end 9 | 10 | def inclusive? 11 | true 12 | end 13 | 14 | def match(path) 15 | @regex.match(path) if @regex 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/one", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-one.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/one", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-one.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/two", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-two.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/lib/puppet/functions/bad_data/data.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'bad_data::data') do 2 | def data() 3 | { 'b' => 'module_b', # Intentionally bad key (no module prefix) 4 | 'bad_data::c' => 'module_c' # Good key. Should be OK 5 | } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/puppet/network/http/response.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Network::HTTP::Response 2 | def initialize(handler, response) 3 | @handler = handler 4 | @response = response 5 | end 6 | 7 | def respond_with(code, type, body) 8 | @handler.set_content_type(@response, type) 9 | @handler.set_response(@response, body, code) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_defaults/modules/one/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/one", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-one.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/meta/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/meta", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-meta.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "function" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/darwin.mount: -------------------------------------------------------------------------------- 1 | /dev/disk0s2 on / (hfs, local, journaled) 2 | devfs on /dev (devfs, local, nobrowse) 3 | map -hosts on /net (autofs, nosuid, automounted, nobrowse) 4 | map auto_home on /home (autofs, automounted, nobrowse) 5 | /dev/disk0s3 on /usr (hfs, local, journaled) 6 | /dev/fake on /ghost (hfs, local, journaled) 7 | -------------------------------------------------------------------------------- /spec/unit/indirector/file_metadata/selector_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/file_metadata/selector' 5 | 6 | describe Puppet::Indirector::FileMetadata::Selector do 7 | include PuppetSpec::Files 8 | 9 | it_should_behave_like "Puppet::FileServing::Files", :file_metadata 10 | end 11 | 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_content/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/content' 2 | require 'puppet/indirector/file_content' 3 | require 'puppet/indirector/rest' 4 | 5 | class Puppet::Indirector::FileContent::Rest < Puppet::Indirector::REST 6 | desc "Retrieve file contents via a REST HTTP interface." 7 | 8 | use_srv_service(:fileserver) 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/one", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-one.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/argumentdefaults.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define testargs($file, $mode = '0755') { 4 | file { $file: ensure => file, mode => $mode } 5 | } 6 | 7 | testargs { "testingname": 8 | file => "/tmp/argumenttest1" 9 | } 10 | 11 | testargs { "testingother": 12 | file => "/tmp/argumenttest2", 13 | mode => '0644' 14 | } 15 | -------------------------------------------------------------------------------- /spec/unit/application/config_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'puppet/application/config' 4 | 5 | describe Puppet::Application::Config do 6 | it "should be a subclass of Puppet::Application::FaceBase" do 7 | expect(Puppet::Application::Config.superclass).to equal(Puppet::Application::FaceBase) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/file_metadata/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/file_serving/metadata' 2 | require 'puppet/indirector/file_metadata' 3 | require 'puppet/indirector/rest' 4 | 5 | class Puppet::Indirector::FileMetadata::Rest < Puppet::Indirector::REST 6 | desc "Retrieve file metadata via a REST HTTP interface." 7 | 8 | use_srv_service(:fileserver) 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/metawcp/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/metawcp", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-metawcp.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "sample" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/componentrequire.pp: -------------------------------------------------------------------------------- 1 | define testfile($mode) { 2 | file { $name: mode => $mode, ensure => present } 3 | } 4 | 5 | testfile { "/tmp/testing_component_requires2": mode => '0755' } 6 | 7 | file { "/tmp/testing_component_requires1": mode => '0755', ensure => present, 8 | require => Testfile["/tmp/testing_component_requires2"] } 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/multisubs.pp: -------------------------------------------------------------------------------- 1 | class base { 2 | file { "/tmp/multisubtest": content => "base", mode => '0644' } 3 | } 4 | 5 | class sub1 inherits base { 6 | File["/tmp/multisubtest"] { mode => '0755' } 7 | } 8 | 9 | class sub2 inherits base { 10 | File["/tmp/multisubtest"] { content => sub2 } 11 | } 12 | 13 | include sub1, sub2 14 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/argumentdefaults.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | define testargs($file, $mode = 755) { 4 | file { $file: ensure => file, mode => $mode } 5 | } 6 | 7 | testargs { "testingname": 8 | file => "/tmp/argumenttest1" 9 | } 10 | 11 | testargs { "testingother": 12 | file => "/tmp/argumenttest2", 13 | mode => '0644' 14 | } 15 | -------------------------------------------------------------------------------- /benchmarks/evaluations/manifests/interpolation.pp: -------------------------------------------------------------------------------- 1 | $tmp = [ "...$x...", 2 | "...$x...$x", 3 | "...$x...$x...", 4 | "...$x...$x...$x...", 5 | "...$x...$x...$x...$x", 6 | "...$x...$x...$x...$x...", 7 | "...$x...$x...$x...$x...$x", 8 | "...$x...$x...$x...$x...$x...", 9 | "...$x...$x...$x...$x...$x...$x", 10 | "...$x...$x...$x...$x...$x...$x...", 11 | ] -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/callback_indent_test/a.tpl: -------------------------------------------------------------------------------- 1 | <% define 'caller', :for => Object do %> 2 | |before callback 3 | <% expand 'b::do_callback' %> 4 | |after callback 5 | <%iinc%> 6 | |after iinc 7 | <% end %> 8 | 9 | <% define 'callback', :for => Object do %> 10 | |in callback 11 | <% end %> 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb: -------------------------------------------------------------------------------- 1 | Puppet::Functions.create_function(:'environment::data') do 2 | def data() 3 | { 'abc::def::test1' => 'env_test1', 4 | 'abc::def::test2' => 'env_test2', 5 | 'xyz::def::test1' => 'env_test1', 6 | 'xyz::def::test2' => 'env_test2' 7 | } 8 | end 9 | end -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_json/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/empty_json", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-empty_json.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/empty_yaml/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/empty_yaml", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-empty_yaml.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/componentrequire.pp: -------------------------------------------------------------------------------- 1 | define testfile($mode) { 2 | file { $name: mode => $mode, ensure => present } 3 | } 4 | 5 | testfile { "/tmp/testing_component_requires2": mode => '0755' } 6 | 7 | file { "/tmp/testing_component_requires1": mode => '0755', ensure => present, 8 | require => Testfile["/tmp/testing_component_requires2"] } 9 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/multisubs.pp: -------------------------------------------------------------------------------- 1 | class base { 2 | file { "/tmp/multisubtest": content => "base", mode => '0644' } 3 | } 4 | 5 | class sub1 inherits base { 6 | File["/tmp/multisubtest"] { mode => '0755' } 7 | } 8 | 9 | class sub2 inherits base { 10 | File["/tmp/multisubtest"] { content => sub2 } 11 | } 12 | 13 | include sub1, sub2 14 | -------------------------------------------------------------------------------- /lib/puppet/util/watcher/timer.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Util::Watcher::Timer 2 | attr_reader :timeout 3 | 4 | def initialize(timeout) 5 | @timeout = timeout 6 | end 7 | 8 | def start 9 | @start_time = now 10 | end 11 | 12 | def expired? 13 | (now - @start_time) >= @timeout 14 | end 15 | 16 | def now 17 | Time.now.to_i 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/unit/indirector/catalog/rest_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/catalog/rest' 5 | 6 | describe Puppet::Resource::Catalog::Rest do 7 | it "should be a sublcass of Puppet::Indirector::REST" do 8 | expect(Puppet::Resource::Catalog::Rest.superclass).to equal(Puppet::Indirector::REST) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/unit/indirector/status/rest_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/status/rest' 5 | 6 | describe Puppet::Indirector::Status::Rest do 7 | it "should be a subclass of Puppet::Indirector::REST" do 8 | expect(Puppet::Indirector::Status::Rest.superclass).to equal(Puppet::Indirector::REST) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /ext/debian/README.Debian: -------------------------------------------------------------------------------- 1 | puppet for Debian 2 | ------------------ 3 | 4 | The default puppet configuration in Debian will automatically integrate with 5 | etckeeper if etckeeper is installed. puppet will automatically commit any 6 | changes made to files in /etc via etckeeper before and after its run. 7 | 8 | -- Mathias Gug Wed, 18 Aug 2010 15:06:06 -0400 9 | -------------------------------------------------------------------------------- /lib/puppet/indirector/facts/store_configs.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/node/facts' 2 | require 'puppet/indirector/store_configs' 3 | 4 | class Puppet::Node::Facts::StoreConfigs < Puppet::Indirector::StoreConfigs 5 | 6 | desc %q{Part of the "storeconfigs" feature. Should not be directly set by end users.} 7 | 8 | def allow_remote_requests? 9 | false 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/provider/cisco.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/network_device/cisco/device' 2 | require 'puppet/provider/network_device' 3 | 4 | # This is the base class of all prefetched cisco device providers 5 | class Puppet::Provider::Cisco < Puppet::Provider::NetworkDevice 6 | def self.device(url) 7 | Puppet::Util::NetworkDevice::Cisco::Device.new(url) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/settings/directory_setting.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Settings::DirectorySetting < Puppet::Settings::FileSetting 2 | def type 3 | :directory 4 | end 5 | 6 | # @api private 7 | def open_file(filename, option = 'r', &block) 8 | controlled_access do |mode| 9 | Puppet::FileSystem.open(filename, mode, option, &block) 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /lib/puppet/util/limits.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util' 2 | 3 | module Puppet::Util::Limits 4 | # @api private 5 | def setpriority(priority) 6 | return unless priority 7 | 8 | Process.setpriority(0, Process.pid, priority) 9 | rescue Errno::EACCES, NotImplementedError 10 | Puppet.warning("Failed to set process priority to '#{priority}'") 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/hieraprovider/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example/hieraprovider", 3 | "version": "0.0.2", 4 | "source": "git@github.com/example/example-hieraprovider.git", 5 | "dependencies": [], 6 | "author": "Bob the Builder", 7 | "license": "Apache-2.0", 8 | "data_provider": "hiera" 9 | } 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/augeas/augeas/etc/hosts: -------------------------------------------------------------------------------- 1 | # Do not remove the following line, or various programs 2 | # that require network functionality will fail. 3 | 127.0.0.1 localhost.localdomain localhost galia.watzmann.net galia 4 | #172.31.122.254 granny.watzmann.net granny puppet 5 | #172.31.122.1 galia.watzmann.net galia 6 | 172.31.122.14 orange.watzmann.net orange 7 | -------------------------------------------------------------------------------- /spec/lib/puppet/face/huzzah.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/face' 2 | Puppet::Face.define(:huzzah, '2.0.1') do 3 | copyright "Puppet Labs", 2011 4 | license "Apache 2 license; see COPYING" 5 | summary "life is a thing for celebration" 6 | action(:bar) { when_invoked { |options| "is where beer comes from" } } 7 | action(:call_older) { when_invoked { |_| method_on_older } } 8 | end 9 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --protected 2 | --private 3 | --verbose 4 | --markup markdown 5 | --readme README.md 6 | --tag status 7 | --transitive-tag status 8 | --tag comment 9 | --hide-tag comment 10 | --tag dsl:"DSL" 11 | --no-transitive-tag api 12 | --template-path yardoc/templates 13 | --files CO*.md,api/**/*.md 14 | --api public 15 | --api private 16 | --hide-void-return 17 | lib/**/*.rb 18 | -------------------------------------------------------------------------------- /acceptance/tests/apply/classes/should_include_resources_from_class.rb: -------------------------------------------------------------------------------- 1 | test_name "resources declared in a class can be applied with include" 2 | manifest = %q{ 3 | class x { 4 | notify{'a':} 5 | } 6 | include x 7 | } 8 | apply_manifest_on(agents, manifest) do 9 | fail_test "the resource did not apply" unless 10 | stdout.include? "defined 'message' as 'a'" 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/resource/validator.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Resource::Validator 2 | def validate_key(request) 3 | type, title = request.key.split('/', 2) 4 | unless type.downcase == request.instance.type.downcase and title == request.instance.title 5 | raise Puppet::Indirector::ValidationError, "Resource instance does not match request key" 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/puppet/settings/errors.rb: -------------------------------------------------------------------------------- 1 | # Exceptions for the settings module 2 | require 'puppet/error' 3 | 4 | class Puppet::Settings 5 | class SettingsError < Puppet::Error ; end 6 | class ValidationError < SettingsError ; end 7 | class InterpolationError < SettingsError ; end 8 | class ParseError < SettingsError 9 | include Puppet::ExternalFileError 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/fixtures/releases/jamtur01-apache/manifests/ssl.pp: -------------------------------------------------------------------------------- 1 | class apache::ssl { 2 | include apache 3 | 4 | 5 | case $operatingsystem { 6 | "centos": { 7 | package { $apache::params::ssl_package: 8 | require => Package['httpd'], 9 | } 10 | } 11 | "ubuntu": { 12 | a2mod { "ssl": ensure => present, } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/manifests/init.pp: -------------------------------------------------------------------------------- 1 | class one { 2 | class test($param_a = "param default is 100", $param_b = "param default is 200", $param_c = "param default is 300", $param_d = "param default is 400", $param_e = "param default is 500") { 3 | notify { "$param_a, $param_b, $param_c, $param_d, $param_e": } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /spec/unit/indirector/file_bucket_file/rest_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/file_bucket_file/rest' 5 | 6 | describe Puppet::FileBucketFile::Rest do 7 | it "should be a sublcass of Puppet::Indirector::REST" do 8 | expect(Puppet::FileBucketFile::Rest.superclass).to equal(Puppet::Indirector::REST) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /acceptance/tests/apply/classes/should_not_auto_include_resources_from_class.rb: -------------------------------------------------------------------------------- 1 | test_name "resources declared in classes are not applied without include" 2 | manifest = %q{ class x { notify { 'test': message => 'never invoked' } } } 3 | apply_manifest_on(agents, manifest) do 4 | fail_test "found the notify despite not including it" if 5 | stdout.include? "never invoked" 6 | end 7 | -------------------------------------------------------------------------------- /lib/puppet/indirector/report/yaml.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/transaction/report' 2 | require 'puppet/indirector/yaml' 3 | 4 | class Puppet::Transaction::Report::Yaml < Puppet::Indirector::Yaml 5 | desc "Store last report as a flat file, serialized using YAML." 6 | 7 | # Force report to be saved there 8 | def path(name,ext='.yaml') 9 | Puppet[:lastrunreport] 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/parser/functions/digest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/checksums' 2 | Puppet::Parser::Functions::newfunction(:digest, :type => :rvalue, :arity => 1, :doc => "Returns a hash value from a provided string using the digest_algorithm setting from the Puppet config file.") do |args| 3 | algo = Puppet[:digest_algorithm] 4 | Puppet::Util::Checksums.method(algo.intern).call args[0] 5 | end 6 | -------------------------------------------------------------------------------- /acceptance/setup/common/pre-suite/000-delete-puppet-when-none.rb: -------------------------------------------------------------------------------- 1 | test_name "Expunge puppet bits if hypervisor is none" 2 | 3 | # Ensure that the any previous installations of puppet 4 | # are removed from the host if it is not managed by a 5 | # provisioning hypervisor. 6 | 7 | hosts.each do |host| 8 | if host[:hypervisor] == "none" 9 | remove_puppet_on(host) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_request/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/ssl/certificate_request' 2 | require 'puppet/indirector/rest' 3 | 4 | class Puppet::SSL::CertificateRequest::Rest < Puppet::Indirector::REST 5 | desc "Find and save certificate requests over HTTP via REST." 6 | 7 | use_server_setting(:ca_server) 8 | use_port_setting(:ca_port) 9 | use_srv_service(:ca) 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/network/http/api/ca/v1.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/network/http/api/indirected_routes' 2 | class Puppet::Network::HTTP::API::CA::V1 3 | 4 | INDIRECTED = Puppet::Network::HTTP::Route. 5 | path(/.*/). 6 | any(Puppet::Network::HTTP::API::IndirectedRoutes.new) 7 | 8 | def self.routes 9 | Puppet::Network::HTTP::Route.path(%r{v1}).any.chain(INDIRECTED) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/lib/puppet/face/1.0.0/huzzah.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/face' 2 | Puppet::Face.define(:huzzah, '1.0.0') do 3 | copyright "Puppet Labs", 2011 4 | license "Apache 2 license; see COPYING" 5 | summary "life is a thing for celebration" 6 | action(:obsolete_in_core) { when_invoked { |_| "you are in obsolete core now!" } } 7 | action(:call_newer) { when_invoked { |_| method_on_newer } } 8 | end 9 | -------------------------------------------------------------------------------- /ext/debian/puppet-common.dirs: -------------------------------------------------------------------------------- 1 | etc/puppet 2 | etc/puppet/environments 3 | etc/puppet/environments/example_env 4 | etc/puppet/environments/example_env/modules 5 | etc/puppet/environments/example_env/manifests 6 | etc/puppet/manifests 7 | etc/puppet/templates 8 | etc/puppet/modules 9 | usr/lib/ruby/vendor_ruby 10 | usr/share/puppet/ext 11 | var/lib/puppet 12 | var/log/puppet 13 | var/run/puppet 14 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('abc::default') do 2 | # In the default bindings for this module 3 | bind { 4 | # bind its name to the 'puppet' module data provider 5 | name 'abc' 6 | to 'function' 7 | in_multibind 'puppet::module_data' 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/bca/lib/puppet/bindings/bca/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('bca::default') do 2 | # In the default bindings for this module 3 | bind { 4 | # bind its name to the 'puppet' module data provider 5 | name 'bca' 6 | to 'function' 7 | in_multibind 'puppet::module_data' 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/aliastest.pp: -------------------------------------------------------------------------------- 1 | file { "a file": 2 | path => "/tmp/aliastest", 3 | ensure => file 4 | } 5 | 6 | file { "another": 7 | path => "/tmp/aliastest2", 8 | ensure => file, 9 | require => File["a file"] 10 | } 11 | 12 | file { "a third": 13 | path => "/tmp/aliastest3", 14 | ensure => file, 15 | require => File["/tmp/aliastest"] 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/defineoverrides.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | $file = "/tmp/defineoverrides1" 4 | 5 | define myfile($mode) { 6 | file { $name: ensure => file, mode => $mode } 7 | } 8 | 9 | class base { 10 | myfile { $file: mode => '0644' } 11 | } 12 | 13 | class sub inherits base { 14 | Myfile[$file] { mode => '0755', } # test the end-comma 15 | } 16 | 17 | include sub 18 | -------------------------------------------------------------------------------- /spec/integration/reports_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/reports' 5 | 6 | describe Puppet::Reports, " when using report types" do 7 | before do 8 | Puppet.settings.stubs(:use) 9 | end 10 | 11 | it "should load report types as modules" do 12 | expect(Puppet::Reports.report(:store)).to be_instance_of(Module) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /acceptance/setup/git/pre-suite/020_PuppetUserAndGroup.rb: -------------------------------------------------------------------------------- 1 | test_name 'Puppet User and Group' do 2 | hosts.each do |host| 3 | 4 | step "ensure puppet user and group added to all nodes because this is what the packages do" do 5 | on host, puppet("resource user puppet ensure=present") 6 | on host, puppet("resource group puppet ensure=present") 7 | end 8 | 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/module_tool/errors.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/module_tool' 2 | 3 | module Puppet::ModuleTool 4 | module Errors 5 | require 'puppet/module_tool/errors/base' 6 | require 'puppet/module_tool/errors/installer' 7 | require 'puppet/module_tool/errors/uninstaller' 8 | require 'puppet/module_tool/errors/upgrader' 9 | require 'puppet/module_tool/errors/shared' 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/indent_string_test.tpl: -------------------------------------------------------------------------------- 1 | <% define 'IndentStringTest', :for => Object do %> 2 | <% file 'indentStringTestDefaultIndent.out' do %> 3 | <%iinc%> 4 | <- your default here 5 | <%idec%> 6 | <% end %> 7 | <% file 'indentStringTestTabIndent.out', "\t" do %> 8 | <%iinc%> 9 | <- tab 10 | <%idec%> 11 | <% end %> 12 | <% end %> -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/remove_named_resource: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | @daily /bin/unnamed_special_command >> /dev/null 2>&1 4 | 5 | # commend with blankline above and below 6 | 7 | 17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command 8 | 9 | # Puppet Name: Monthly job 10 | SHELL=/bin/sh 11 | MAILTO=mail@company.com 12 | 15 14 1 * * $HOME/bin/monthly 13 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('abc::default') do 2 | # In the default bindings for this module 3 | bind { 4 | # bind its name to the 'puppet' environment data provider 5 | name 'abc' 6 | to 'function' 7 | in_multibind 'puppet::module_data' 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/data_providers/environments/production/modules/xyz/lib/puppet/bindings/xyz/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('xyz::default') do 2 | # In the default bindings for this module 3 | bind { 4 | # bind its name to the 'puppet' environment data provider 5 | name 'xyz' 6 | to 'function' 7 | in_multibind 'puppet::module_data' 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/aliastest.pp: -------------------------------------------------------------------------------- 1 | file { "a file": 2 | path => "/tmp/aliastest", 3 | ensure => file 4 | } 5 | 6 | file { "another": 7 | path => "/tmp/aliastest2", 8 | ensure => file, 9 | require => File["a file"] 10 | } 11 | 12 | file { "a third": 13 | path => "/tmp/aliastest3", 14 | ensure => file, 15 | require => File["/tmp/aliastest"] 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/defineoverrides.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | $file = "/tmp/defineoverrides1" 4 | 5 | define myfile($mode) { 6 | file { $name: ensure => file, mode => $mode } 7 | } 8 | 9 | class base { 10 | myfile { $file: mode => '0644' } 11 | } 12 | 13 | class sub inherits base { 14 | Myfile[$file] { mode => '0755', } # test the end-comma 15 | } 16 | 17 | include sub 18 | -------------------------------------------------------------------------------- /spec/unit/indirector/status/local_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/indirector/status/local' 5 | 6 | describe Puppet::Indirector::Status::Local do 7 | it "should set the puppet version" do 8 | Puppet::Status.indirection.terminus_class = :local 9 | expect(Puppet::Status.indirection.find('*').version).to eq(Puppet.version) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /acceptance/tests/modules/list/with_no_installed_modules.rb: -------------------------------------------------------------------------------- 1 | test_name "puppet module list (with no installed modules)" 2 | 3 | 4 | step "List the installed modules" 5 | modulesdir = master.tmpdir('puppet_module') 6 | on master, puppet("module list --modulepath #{modulesdir}") do 7 | assert_match(/no modules installed/, stdout, 8 | "Declaration of 'no modules installed' not found") 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/settings/terminus_setting.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Settings::TerminusSetting < Puppet::Settings::BaseSetting 2 | def munge(value) 3 | case value 4 | when '', nil 5 | nil 6 | when String 7 | value.intern 8 | when Symbol 9 | value 10 | else 11 | raise Puppet::Settings::ValidationError, "Invalid terminus setting: #{value}" 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /lib/puppet/vendor/rgen/test/template_language_test/templates/no_indent_test/test2.tpl: -------------------------------------------------------------------------------- 1 | <% define 'Test', :for => Object do %> 2 | <%iinc%><%iinc%> 3 | return <% expand 'Call1' %>; 4 | <%idec%><%idec%> 5 | <% end %> 6 | 7 | <% define 'Call1', :for => Object do %> 8 | x<% expand 'Call2' %><%nows%> 9 | <% end %> 10 | 11 | <% define 'Call2', :for => Object do %> 12 | xxx<%nows%> 13 | <% end %> -------------------------------------------------------------------------------- /spec/fixtures/unit/parser/lexer/classheirarchy.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | class base { 4 | file { "/tmp/classheir1": ensure => file, mode => '0755' } 5 | } 6 | 7 | class sub1 inherits base { 8 | file { "/tmp/classheir2": ensure => file, mode => '0755' } 9 | } 10 | 11 | class sub2 inherits base { 12 | file { "/tmp/classheir3": ensure => file, mode => '0755' } 13 | } 14 | 15 | include sub1, sub2 16 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/binder/bindings_composer/ok/binder_config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1 3 | layers: 4 | [{name: site, include: 'confdir:/confdirtest'}, 5 | {name: test, include: 'echo:/quick/brown/fox'}, 6 | {name: modules, include: ['module:/*::default'], exclude: 'module:/bad::default/' } 7 | ] 8 | extensions: 9 | scheme_handlers: 10 | echo: 'PuppetX::Awesome2::EchoSchemeHandler' 11 | -------------------------------------------------------------------------------- /lib/puppet/indirector/report/msgpack.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/transaction/report' 2 | require 'puppet/indirector/msgpack' 3 | 4 | class Puppet::Transaction::Report::Msgpack < Puppet::Indirector::Msgpack 5 | desc "Store last report as a flat file, serialized using MessagePack." 6 | 7 | # Force report to be saved there 8 | def path(name,ext='.msgpack') 9 | Puppet[:lastrunreport] 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/reports/log.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/reports' 2 | 3 | Puppet::Reports.register_report(:log) do 4 | desc "Send all received logs to the local log destinations. Usually 5 | the log destination is syslog." 6 | 7 | def process 8 | self.logs.each do |log| 9 | log.source = "//#{self.host}/#{log.source}" 10 | Puppet::Util::Log.newmessage(log) 11 | end 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/unit/pops/parser/lexer/classheirarchy.pp: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | class base { 4 | file { "/tmp/classheir1": ensure => file, mode => '0755' } 5 | } 6 | 7 | class sub1 inherits base { 8 | file { "/tmp/classheir2": ensure => file, mode => '0755' } 9 | } 10 | 11 | class sub2 inherits base { 12 | file { "/tmp/classheir3": ensure => file, mode => '0755' } 13 | } 14 | 15 | include sub1, sub2 16 | -------------------------------------------------------------------------------- /spec/fixtures/unit/provider/mount/parsed/netbsd.mount: -------------------------------------------------------------------------------- 1 | /dev/ad0s1a on / (ufs, local) 2 | devfs on /dev (devfs, local) 3 | /dev/ad0s1e on /tmp (ufs, local, soft-updates) 4 | /dev/ad0s1f on /usr (ufs, local, soft-updates) 5 | /dev/ad0s1d on /var (ufs, local, soft-updates) 6 | /dev/ad3s1e on /data (ufs, local, soft-updates) 7 | /dev/ad3s1h on /ghost (ufs, local, soft-updates) 8 | devfs on /var/named/dev (devfs, local) 9 | -------------------------------------------------------------------------------- /spec/unit/data_binding_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | require 'puppet/data_binding' 3 | 4 | describe Puppet::DataBinding do 5 | describe "when indirecting" do 6 | it "should default to the 'hiera' data_binding terminus" do 7 | Puppet::DataBinding.indirection.reset_terminus_class 8 | expect(Puppet::DataBinding.indirection.terminus_class).to eq(:hiera) 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/puppet/graph.rb: -------------------------------------------------------------------------------- 1 | module Puppet::Graph 2 | require 'puppet/graph/prioritizer' 3 | require 'puppet/graph/sequential_prioritizer' 4 | require 'puppet/graph/title_hash_prioritizer' 5 | require 'puppet/graph/random_prioritizer' 6 | 7 | require 'puppet/graph/simple_graph' 8 | require 'puppet/graph/rb_tree_map' 9 | require 'puppet/graph/key' 10 | require 'puppet/graph/relationship_graph' 11 | end 12 | -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/modify_entry: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | @daily /bin/unnamed_special_command >> /dev/null 2>&1 4 | 5 | # commend with blankline above and below 6 | 7 | 17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command 8 | 9 | # Puppet Name: My daily failure 10 | MAILTO="" 11 | @daily /bin/false 12 | # Puppet Name: Monthly job 13 | @monthly /usr/bin/monthly 14 | -------------------------------------------------------------------------------- /spec/fixtures/unit/functions/lookup/environments/production/modules/bad_data/lib/puppet/bindings/bad_data/default.rb: -------------------------------------------------------------------------------- 1 | Puppet::Bindings.newbindings('bad_data::default') do 2 | # In the default bindings for this module 3 | bind { 4 | # bind its name to the 'puppet' module data provider 5 | name 'bad_data' 6 | to 'function' 7 | in_multibind 'puppet::module_data' 8 | } 9 | end 10 | -------------------------------------------------------------------------------- /lib/puppet/indirector/certificate_revocation_list/rest.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/ssl/certificate_revocation_list' 2 | require 'puppet/indirector/rest' 3 | 4 | class Puppet::SSL::CertificateRevocationList::Rest < Puppet::Indirector::REST 5 | desc "Find and save certificate revocation lists over HTTP via REST." 6 | 7 | use_server_setting(:ca_server) 8 | use_port_setting(:ca_port) 9 | use_srv_service(:ca) 10 | end 11 | -------------------------------------------------------------------------------- /lib/puppet/settings/array_setting.rb: -------------------------------------------------------------------------------- 1 | class Puppet::Settings::ArraySetting < Puppet::Settings::BaseSetting 2 | 3 | def type 4 | :array 5 | end 6 | 7 | def munge(value) 8 | case value 9 | when String 10 | value.split(/\s*,\s*/) 11 | when Array 12 | value 13 | else 14 | raise ArgumentError, "Expected an Array or String, got a #{value.class}" 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/puppet/ssl.rb: -------------------------------------------------------------------------------- 1 | # Just to make the constants work out. 2 | require 'puppet' 3 | require 'openssl' 4 | 5 | module Puppet::SSL # :nodoc: 6 | CA_NAME = "ca" 7 | require 'puppet/ssl/configuration' 8 | require 'puppet/ssl/host' 9 | require 'puppet/ssl/oids' 10 | require 'puppet/ssl/validator' 11 | require 'puppet/ssl/validator/no_validator' 12 | require 'puppet/ssl/validator/default_validator' 13 | end 14 | -------------------------------------------------------------------------------- /lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/util/rdoc/parser/puppet_parser_core.rb' 2 | 3 | module RDoc 4 | PUPPET_RDOC_VERSION = 2 5 | 6 | # @api private 7 | class PuppetParserRDoc2 < Parser 8 | include PuppetParserCore 9 | 10 | def create_rdoc_preprocess 11 | preprocess = Markup::PreProcess.new(@input_file_name, @options.rdoc_include) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /spec/integration/provider/mailalias/aliases_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | require 'shared_behaviours/all_parsedfile_providers' 4 | 5 | provider_class = Puppet::Type.type(:mailalias).provider(:aliases) 6 | 7 | describe provider_class do 8 | # #1560, in which we corrupt the format of complex mail aliases. 9 | it_should_behave_like "all parsedfile providers", provider_class 10 | end 11 | -------------------------------------------------------------------------------- /spec/fixtures/integration/provider/cron/crontab/remove_unnamed_resource: -------------------------------------------------------------------------------- 1 | # HEADER: some simple 2 | # HEADER: header 3 | @daily /bin/unnamed_special_command >> /dev/null 2>&1 4 | 5 | # commend with blankline above and below 6 | 7 | 8 | # Puppet Name: My daily failure 9 | MAILTO="" 10 | @daily /bin/false 11 | # Puppet Name: Monthly job 12 | SHELL=/bin/sh 13 | MAILTO=mail@company.com 14 | 15 14 1 * * $HOME/bin/monthly 15 | -------------------------------------------------------------------------------- /spec/integration/reference/providers_spec.rb: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env ruby 2 | require 'spec_helper' 3 | 4 | require 'puppet/util/reference' 5 | 6 | reference = Puppet::Util::Reference.reference(:providers) 7 | 8 | describe reference do 9 | it "should exist" do 10 | expect(reference).not_to be_nil 11 | end 12 | 13 | it "should be able to be rendered as markdown" do 14 | reference.to_markdown 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/puppet/application/resource_type.rb: -------------------------------------------------------------------------------- 1 | require 'puppet/application/indirection_base' 2 | 3 | # NOTE: this is using an "old" naming convention (underscores instead of camel-case), for backwards 4 | # compatibility with 2.7.x. When the old naming convention is officially and publicly deprecated, 5 | # this should be changed to camel-case. 6 | class Puppet::Application::Resource_type < Puppet::Application::IndirectionBase 7 | end 8 | --------------------------------------------------------------------------------