bolt 0.20.3 → 0.20.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of bolt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/bolt-modules/boltlib/lib/puppet/functions/run_task.rb +3 -3
- data/bolt-modules/boltlib/lib/puppet/functions/set_feature.rb +33 -0
- data/lib/bolt/inventory.rb +19 -1
- data/lib/bolt/target.rb +15 -0
- data/lib/bolt/transport/local.rb +6 -1
- data/lib/bolt/transport/orch.rb +2 -0
- data/lib/bolt/transport/ssh.rb +7 -2
- data/lib/bolt/transport/winrm.rb +6 -1
- data/lib/bolt/version.rb +1 -1
- data/modules/facts/plans/retrieve.pp +2 -26
- data/modules/facts/tasks/init.json +9 -0
- data/vendored/puppet/lib/hiera/puppet_function.rb +1 -1
- data/vendored/puppet/lib/hiera/scope.rb +24 -2
- data/vendored/puppet/lib/puppet.rb +4 -13
- data/vendored/puppet/lib/puppet/application.rb +2 -2
- data/vendored/puppet/lib/puppet/application/agent.rb +1 -1
- data/vendored/puppet/lib/puppet/application/apply.rb +1 -1
- data/vendored/puppet/lib/puppet/application/cert.rb +1 -1
- data/vendored/puppet/lib/puppet/application/device.rb +8 -8
- data/vendored/puppet/lib/puppet/application/face_base.rb +1 -1
- data/vendored/puppet/lib/puppet/application/lookup.rb +2 -2
- data/vendored/puppet/lib/puppet/application/resource.rb +2 -2
- data/vendored/puppet/lib/puppet/application/script.rb +1 -1
- data/vendored/puppet/lib/puppet/configurer.rb +47 -24
- data/vendored/puppet/lib/puppet/confine.rb +4 -1
- data/vendored/puppet/lib/puppet/context.rb +1 -1
- data/vendored/puppet/lib/puppet/defaults.rb +32 -44
- data/vendored/puppet/lib/puppet/error.rb +14 -7
- data/vendored/puppet/lib/puppet/external/dot.rb +23 -17
- data/vendored/puppet/lib/puppet/face/config.rb +58 -3
- data/vendored/puppet/lib/puppet/face/epp.rb +1 -1
- data/vendored/puppet/lib/puppet/face/module/build.rb +3 -3
- data/vendored/puppet/lib/puppet/face/module/install.rb +0 -4
- data/vendored/puppet/lib/puppet/face/module/list.rb +0 -5
- data/vendored/puppet/lib/puppet/face/module/search.rb +1 -1
- data/vendored/puppet/lib/puppet/face/module/uninstall.rb +0 -4
- data/vendored/puppet/lib/puppet/face/module/upgrade.rb +0 -4
- data/vendored/puppet/lib/puppet/face/status.rb +2 -2
- data/vendored/puppet/lib/puppet/file_serving/base.rb +5 -5
- data/vendored/puppet/lib/puppet/file_serving/metadata.rb +2 -1
- data/vendored/puppet/lib/puppet/forge.rb +7 -8
- data/vendored/puppet/lib/puppet/forge/errors.rb +3 -3
- data/vendored/puppet/lib/puppet/functions/abs.rb +61 -0
- data/vendored/puppet/lib/puppet/functions/all.rb +2 -2
- data/vendored/puppet/lib/puppet/functions/any.rb +2 -2
- data/vendored/puppet/lib/puppet/functions/assert_type.rb +3 -3
- data/vendored/puppet/lib/puppet/functions/break.rb +3 -7
- data/vendored/puppet/lib/puppet/functions/camelcase.rb +62 -0
- data/vendored/puppet/lib/puppet/functions/capitalize.rb +61 -0
- data/vendored/puppet/lib/puppet/functions/ceiling.rb +37 -0
- data/vendored/puppet/lib/puppet/functions/chomp.rb +57 -0
- data/vendored/puppet/lib/puppet/functions/chop.rb +67 -0
- data/vendored/puppet/lib/puppet/functions/compare.rb +125 -0
- data/vendored/puppet/lib/puppet/functions/convert_to.rb +3 -2
- data/vendored/puppet/lib/puppet/functions/dig.rb +21 -1
- data/vendored/puppet/lib/puppet/functions/downcase.rb +89 -0
- data/vendored/puppet/lib/puppet/functions/each.rb +2 -2
- data/vendored/puppet/lib/puppet/functions/empty.rb +1 -3
- data/vendored/puppet/lib/puppet/functions/eyaml_lookup_key.rb +4 -2
- data/vendored/puppet/lib/puppet/functions/filter.rb +2 -2
- data/vendored/puppet/lib/puppet/functions/floor.rb +37 -0
- data/vendored/puppet/lib/puppet/functions/get.rb +150 -0
- data/vendored/puppet/lib/puppet/functions/getvar.rb +87 -0
- data/vendored/puppet/lib/puppet/functions/hiera.rb +5 -5
- data/vendored/puppet/lib/puppet/functions/hiera_array.rb +5 -5
- data/vendored/puppet/lib/puppet/functions/hiera_hash.rb +6 -6
- data/vendored/puppet/lib/puppet/functions/hiera_include.rb +7 -7
- data/vendored/puppet/lib/puppet/functions/hocon_data.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/json_data.rb +3 -3
- data/vendored/puppet/lib/puppet/functions/lest.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/lookup.rb +3 -2
- data/vendored/puppet/lib/puppet/functions/lstrip.rb +58 -0
- data/vendored/puppet/lib/puppet/functions/map.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/match.rb +11 -0
- data/vendored/puppet/lib/puppet/functions/max.rb +183 -0
- data/vendored/puppet/lib/puppet/functions/min.rb +182 -0
- data/vendored/puppet/lib/puppet/functions/next.rb +1 -8
- data/vendored/puppet/lib/puppet/functions/reduce.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/return.rb +1 -8
- data/vendored/puppet/lib/puppet/functions/reverse_each.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/round.rb +24 -0
- data/vendored/puppet/lib/puppet/functions/rstrip.rb +58 -0
- data/vendored/puppet/lib/puppet/functions/size.rb +15 -0
- data/vendored/puppet/lib/puppet/functions/sort.rb +74 -0
- data/vendored/puppet/lib/puppet/functions/step.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/strftime.rb +1 -7
- data/vendored/puppet/lib/puppet/functions/strip.rb +58 -0
- data/vendored/puppet/lib/puppet/functions/then.rb +1 -1
- data/vendored/puppet/lib/puppet/functions/tree_each.rb +7 -7
- data/vendored/puppet/lib/puppet/functions/upcase.rb +89 -0
- data/vendored/puppet/lib/puppet/functions/with.rb +4 -4
- data/vendored/puppet/lib/puppet/functions/yaml_data.rb +4 -2
- data/vendored/puppet/lib/puppet/graph/simple_graph.rb +9 -5
- data/vendored/puppet/lib/puppet/indirector/certificate_revocation_list/rest.rb +0 -11
- data/vendored/puppet/lib/puppet/indirector/indirection.rb +8 -12
- data/vendored/puppet/lib/puppet/indirector/node/exec.rb +1 -1
- data/vendored/puppet/lib/puppet/indirector/node/ldap.rb +1 -1
- data/vendored/puppet/lib/puppet/indirector/request.rb +11 -11
- data/vendored/puppet/lib/puppet/indirector/rest.rb +11 -11
- data/vendored/puppet/lib/puppet/interface/action.rb +2 -5
- data/vendored/puppet/lib/puppet/metatype/manager.rb +0 -2
- data/vendored/puppet/lib/puppet/module.rb +7 -33
- data/vendored/puppet/lib/puppet/module/task.rb +0 -1
- data/vendored/puppet/lib/puppet/module_tool.rb +2 -5
- data/vendored/puppet/lib/puppet/module_tool/applications/application.rb +5 -5
- data/vendored/puppet/lib/puppet/module_tool/applications/builder.rb +2 -2
- data/vendored/puppet/lib/puppet/module_tool/applications/checksummer.rb +3 -3
- data/vendored/puppet/lib/puppet/module_tool/applications/installer.rb +6 -7
- data/vendored/puppet/lib/puppet/module_tool/applications/uninstaller.rb +1 -2
- data/vendored/puppet/lib/puppet/module_tool/applications/unpacker.rb +2 -2
- data/vendored/puppet/lib/puppet/module_tool/applications/upgrader.rb +5 -6
- data/vendored/puppet/lib/puppet/module_tool/dependency.rb +1 -1
- data/vendored/puppet/lib/puppet/module_tool/installed_modules.rb +2 -2
- data/vendored/puppet/lib/puppet/module_tool/local_tarball.rb +3 -3
- data/vendored/puppet/lib/puppet/module_tool/metadata.rb +3 -4
- data/vendored/puppet/lib/puppet/module_tool/shared_behaviors.rb +2 -2
- data/vendored/puppet/lib/puppet/network/authconfig.rb +0 -13
- data/vendored/puppet/lib/puppet/network/format_support.rb +1 -1
- data/vendored/puppet/lib/puppet/network/formats.rb +5 -7
- data/vendored/puppet/lib/puppet/network/http.rb +0 -2
- data/vendored/puppet/lib/puppet/network/http/api.rb +1 -10
- data/vendored/puppet/lib/puppet/network/http/api/master/v3/environment.rb +2 -2
- data/vendored/puppet/lib/puppet/network/http/api/master/v3/environments.rb +2 -2
- data/vendored/puppet/lib/puppet/network/http/compression.rb +1 -1
- data/vendored/puppet/lib/puppet/network/http/connection.rb +11 -3
- data/vendored/puppet/lib/puppet/network/http/error.rb +3 -3
- data/vendored/puppet/lib/puppet/network/http/factory.rb +3 -0
- data/vendored/puppet/lib/puppet/network/http/handler.rb +59 -27
- data/vendored/puppet/lib/puppet/network/resolver.rb +140 -67
- data/vendored/puppet/lib/puppet/node/environment.rb +2 -19
- data/vendored/puppet/lib/puppet/parameter.rb +12 -7
- data/vendored/puppet/lib/puppet/parser/ast.rb +4 -8
- data/vendored/puppet/lib/puppet/parser/ast/branch.rb +3 -3
- data/vendored/puppet/lib/puppet/parser/ast/leaf.rb +5 -0
- data/vendored/puppet/lib/puppet/parser/ast/pops_bridge.rb +18 -0
- data/vendored/puppet/lib/puppet/parser/compiler.rb +3 -4
- data/vendored/puppet/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +9 -2
- data/vendored/puppet/lib/puppet/parser/functions.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/assert_type.rb +3 -3
- data/vendored/puppet/lib/puppet/parser/functions/create_resources.rb +1 -7
- data/vendored/puppet/lib/puppet/parser/functions/each.rb +2 -2
- data/vendored/puppet/lib/puppet/parser/functions/filter.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/hiera.rb +4 -4
- data/vendored/puppet/lib/puppet/parser/functions/hiera_array.rb +5 -5
- data/vendored/puppet/lib/puppet/parser/functions/hiera_hash.rb +6 -6
- data/vendored/puppet/lib/puppet/parser/functions/hiera_include.rb +10 -11
- data/vendored/puppet/lib/puppet/parser/functions/inline_template.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/lest.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/lookup.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/map.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/reduce.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/return.rb +22 -1
- data/vendored/puppet/lib/puppet/parser/functions/reverse_each.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/step.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/then.rb +1 -1
- data/vendored/puppet/lib/puppet/parser/functions/with.rb +4 -4
- data/vendored/puppet/lib/puppet/parser/resource.rb +0 -1
- data/vendored/puppet/lib/puppet/parser/resource/param.rb +12 -5
- data/vendored/puppet/lib/puppet/parser/scope.rb +5 -7
- data/vendored/puppet/lib/puppet/pops/evaluator/compare_operator.rb +3 -1
- data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_support.rb +2 -7
- data/vendored/puppet/lib/puppet/pops/issues.rb +4 -0
- data/vendored/puppet/lib/puppet/pops/loader/loader_paths.rb +2 -2
- data/vendored/puppet/lib/puppet/pops/loader/module_loaders.rb +17 -12
- data/vendored/puppet/lib/puppet/pops/loader/task_instantiator.rb +73 -45
- data/vendored/puppet/lib/puppet/pops/lookup/lookup_adapter.rb +55 -6
- data/vendored/puppet/lib/puppet/pops/model/model_label_provider.rb +2 -0
- data/vendored/puppet/lib/puppet/pops/parser/epp_parser.rb +1 -1
- data/vendored/puppet/lib/puppet/pops/parser/epp_support.rb +6 -2
- data/vendored/puppet/lib/puppet/pops/parser/lexer2.rb +1 -1
- data/vendored/puppet/lib/puppet/pops/pcore.rb +7 -7
- data/vendored/puppet/lib/puppet/pops/puppet_stack.rb +15 -1
- data/vendored/puppet/lib/puppet/pops/serialization.rb +2 -2
- data/vendored/puppet/lib/puppet/pops/serialization/from_data_converter.rb +2 -2
- data/vendored/puppet/lib/puppet/pops/serialization/json.rb +7 -7
- data/vendored/puppet/lib/puppet/pops/serialization/to_data_converter.rb +5 -5
- data/vendored/puppet/lib/puppet/pops/types/types.rb +8 -4
- data/vendored/puppet/lib/puppet/pops/validation/checker4_0.rb +73 -0
- data/vendored/puppet/lib/puppet/pops/validation/validator_factory_4_0.rb +4 -3
- data/vendored/puppet/lib/puppet/provider/augeas/augeas.rb +7 -0
- data/vendored/puppet/lib/puppet/provider/service/systemd.rb +1 -1
- data/vendored/puppet/lib/puppet/provider/user/aix.rb +2 -2
- data/vendored/puppet/lib/puppet/provider/yumrepo/inifile.rb +21 -9
- data/vendored/puppet/lib/puppet/reference/providers.rb +1 -1
- data/vendored/puppet/lib/puppet/reference/report.rb +1 -1
- data/vendored/puppet/lib/puppet/resource.rb +1 -1
- data/vendored/puppet/lib/puppet/resource/capability_finder.rb +4 -4
- data/vendored/puppet/lib/puppet/resource/catalog.rb +6 -3
- data/vendored/puppet/lib/puppet/resource/type.rb +6 -2
- data/vendored/puppet/lib/puppet/rest/client.rb +79 -0
- data/vendored/puppet/lib/puppet/rest/errors.rb +14 -0
- data/vendored/puppet/lib/puppet/rest/response.rb +29 -0
- data/vendored/puppet/lib/puppet/rest/route.rb +102 -0
- data/vendored/puppet/lib/puppet/rest/routes.rb +31 -0
- data/vendored/puppet/lib/puppet/settings.rb +9 -5
- data/vendored/puppet/lib/puppet/settings/config_file.rb +1 -1
- data/vendored/puppet/lib/puppet/settings/environment_conf.rb +10 -1
- data/vendored/puppet/lib/puppet/ssl.rb +0 -1
- data/vendored/puppet/lib/puppet/ssl/certificate.rb +6 -2
- data/vendored/puppet/lib/puppet/ssl/certificate_authority.rb +3 -3
- data/vendored/puppet/lib/puppet/ssl/host.rb +258 -19
- data/vendored/puppet/lib/puppet/ssl/validator/default_validator.rb +33 -19
- data/vendored/puppet/lib/puppet/syntax_checkers/json.rb +1 -1
- data/vendored/puppet/lib/puppet/transaction/event.rb +34 -7
- data/vendored/puppet/lib/puppet/transaction/report.rb +17 -14
- data/vendored/puppet/lib/puppet/type.rb +20 -12
- data/vendored/puppet/lib/puppet/type/file.rb +1 -1
- data/vendored/puppet/lib/puppet/type/file/content.rb +15 -2
- data/vendored/puppet/lib/puppet/type/file/ensure.rb +1 -1
- data/vendored/puppet/lib/puppet/type/schedule.rb +1 -1
- data/vendored/puppet/lib/puppet/type/stage.rb +1 -1
- data/vendored/puppet/lib/puppet/type/tidy.rb +5 -1
- data/vendored/puppet/lib/puppet/type/user.rb +35 -18
- data/vendored/puppet/lib/puppet/type/yumrepo.rb +8 -17
- data/vendored/puppet/lib/puppet/util.rb +0 -1
- data/vendored/puppet/lib/puppet/util/autoload.rb +1 -6
- data/vendored/puppet/lib/puppet/util/checksums.rb +0 -2
- data/vendored/puppet/lib/puppet/util/classgen.rb +0 -6
- data/vendored/puppet/lib/puppet/util/fileparsing.rb +27 -5
- data/vendored/puppet/lib/puppet/util/instance_loader.rb +3 -3
- data/vendored/puppet/lib/puppet/util/json.rb +77 -0
- data/vendored/puppet/lib/puppet/util/json_lockfile.rb +3 -3
- data/vendored/puppet/lib/puppet/util/ldap/connection.rb +7 -7
- data/vendored/puppet/lib/puppet/util/log/destinations.rb +2 -2
- data/vendored/puppet/lib/puppet/util/logging.rb +1 -1
- data/vendored/puppet/lib/puppet/util/plist.rb +1 -1
- data/vendored/puppet/lib/puppet/util/provider_features.rb +2 -5
- data/vendored/puppet/lib/puppet/util/reference.rb +5 -4
- data/vendored/puppet/lib/puppet/util/tagging.rb +16 -3
- data/vendored/puppet/lib/puppet/version.rb +1 -1
- metadata +44 -26
- data/vendored/puppet/lib/puppet/application/master.rb +0 -317
- data/vendored/puppet/lib/puppet/feature/rack.rb +0 -19
- data/vendored/puppet/lib/puppet/network/http/api/ca.rb +0 -2
- data/vendored/puppet/lib/puppet/network/http/api/ca/v1.rb +0 -11
- data/vendored/puppet/lib/puppet/network/http/rack.rb +0 -33
- data/vendored/puppet/lib/puppet/network/http/rack/rest.rb +0 -162
- data/vendored/puppet/lib/puppet/network/http/webrick.rb +0 -124
- data/vendored/puppet/lib/puppet/network/http/webrick/rest.rb +0 -114
- data/vendored/puppet/lib/puppet/network/server.rb +0 -39
- data/vendored/puppet/lib/puppet/ssl/configuration.rb +0 -61
- data/vendored/puppet/lib/puppet/util/methodhelper.rb +0 -32
- data/vendored/puppet/lib/puppet/vendor/load_semantic.rb +0 -1
- data/vendored/puppet/lib/puppet/vendor/load_semantic_puppet.rb +0 -1
- data/vendored/puppet/lib/puppet/vendor/semantic/lib/semantic.rb +0 -5
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb +0 -11
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency.rb +0 -181
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph.rb +0 -60
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph_node.rb +0 -117
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/module_release.rb +0 -58
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb +0 -25
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/unsatisfiable_graph.rb +0 -31
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +0 -3
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +0 -203
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +0 -758
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bolt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0.6'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: semantic_puppet
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 1.0.2
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.0.2
|
195
209
|
- !ruby/object:Gem::Dependency
|
196
210
|
name: win32-dir
|
197
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -327,6 +341,7 @@ files:
|
|
327
341
|
- bolt-modules/boltlib/lib/puppet/functions/run_plan.rb
|
328
342
|
- bolt-modules/boltlib/lib/puppet/functions/run_script.rb
|
329
343
|
- bolt-modules/boltlib/lib/puppet/functions/run_task.rb
|
344
|
+
- bolt-modules/boltlib/lib/puppet/functions/set_feature.rb
|
330
345
|
- bolt-modules/boltlib/lib/puppet/functions/set_var.rb
|
331
346
|
- bolt-modules/boltlib/lib/puppet/functions/vars.rb
|
332
347
|
- bolt-modules/boltlib/lib/puppet/functions/without_default_logging.rb
|
@@ -383,6 +398,7 @@ files:
|
|
383
398
|
- modules/facts/plans/init.pp
|
384
399
|
- modules/facts/plans/retrieve.pp
|
385
400
|
- modules/facts/tasks/bash.sh
|
401
|
+
- modules/facts/tasks/init.json
|
386
402
|
- modules/facts/tasks/powershell.ps1
|
387
403
|
- modules/facts/tasks/ruby.rb
|
388
404
|
- modules/puppetdb_fact/plans/init.pp
|
@@ -574,7 +590,6 @@ files:
|
|
574
590
|
- vendored/puppet/lib/puppet/application/key.rb
|
575
591
|
- vendored/puppet/lib/puppet/application/lookup.rb
|
576
592
|
- vendored/puppet/lib/puppet/application/man.rb
|
577
|
-
- vendored/puppet/lib/puppet/application/master.rb
|
578
593
|
- vendored/puppet/lib/puppet/application/module.rb
|
579
594
|
- vendored/puppet/lib/puppet/application/node.rb
|
580
595
|
- vendored/puppet/lib/puppet/application/parser.rb
|
@@ -658,7 +673,6 @@ files:
|
|
658
673
|
- vendored/puppet/lib/puppet/feature/libuser.rb
|
659
674
|
- vendored/puppet/lib/puppet/feature/msgpack.rb
|
660
675
|
- vendored/puppet/lib/puppet/feature/pe_license.rb
|
661
|
-
- vendored/puppet/lib/puppet/feature/rack.rb
|
662
676
|
- vendored/puppet/lib/puppet/feature/selinux.rb
|
663
677
|
- vendored/puppet/lib/puppet/feature/ssh.rb
|
664
678
|
- vendored/puppet/lib/puppet/feature/telnet.rb
|
@@ -696,6 +710,7 @@ files:
|
|
696
710
|
- vendored/puppet/lib/puppet/forge/errors.rb
|
697
711
|
- vendored/puppet/lib/puppet/forge/repository.rb
|
698
712
|
- vendored/puppet/lib/puppet/functions.rb
|
713
|
+
- vendored/puppet/lib/puppet/functions/abs.rb
|
699
714
|
- vendored/puppet/lib/puppet/functions/alert.rb
|
700
715
|
- vendored/puppet/lib/puppet/functions/all.rb
|
701
716
|
- vendored/puppet/lib/puppet/functions/annotate.rb
|
@@ -704,12 +719,19 @@ files:
|
|
704
719
|
- vendored/puppet/lib/puppet/functions/binary_file.rb
|
705
720
|
- vendored/puppet/lib/puppet/functions/break.rb
|
706
721
|
- vendored/puppet/lib/puppet/functions/call.rb
|
722
|
+
- vendored/puppet/lib/puppet/functions/camelcase.rb
|
723
|
+
- vendored/puppet/lib/puppet/functions/capitalize.rb
|
724
|
+
- vendored/puppet/lib/puppet/functions/ceiling.rb
|
725
|
+
- vendored/puppet/lib/puppet/functions/chomp.rb
|
726
|
+
- vendored/puppet/lib/puppet/functions/chop.rb
|
727
|
+
- vendored/puppet/lib/puppet/functions/compare.rb
|
707
728
|
- vendored/puppet/lib/puppet/functions/contain.rb
|
708
729
|
- vendored/puppet/lib/puppet/functions/convert_to.rb
|
709
730
|
- vendored/puppet/lib/puppet/functions/crit.rb
|
710
731
|
- vendored/puppet/lib/puppet/functions/debug.rb
|
711
732
|
- vendored/puppet/lib/puppet/functions/defined.rb
|
712
733
|
- vendored/puppet/lib/puppet/functions/dig.rb
|
734
|
+
- vendored/puppet/lib/puppet/functions/downcase.rb
|
713
735
|
- vendored/puppet/lib/puppet/functions/each.rb
|
714
736
|
- vendored/puppet/lib/puppet/functions/emerg.rb
|
715
737
|
- vendored/puppet/lib/puppet/functions/empty.rb
|
@@ -719,6 +741,9 @@ files:
|
|
719
741
|
- vendored/puppet/lib/puppet/functions/filter.rb
|
720
742
|
- vendored/puppet/lib/puppet/functions/find_file.rb
|
721
743
|
- vendored/puppet/lib/puppet/functions/flatten.rb
|
744
|
+
- vendored/puppet/lib/puppet/functions/floor.rb
|
745
|
+
- vendored/puppet/lib/puppet/functions/get.rb
|
746
|
+
- vendored/puppet/lib/puppet/functions/getvar.rb
|
722
747
|
- vendored/puppet/lib/puppet/functions/hiera.rb
|
723
748
|
- vendored/puppet/lib/puppet/functions/hiera_array.rb
|
724
749
|
- vendored/puppet/lib/puppet/functions/hiera_hash.rb
|
@@ -734,8 +759,11 @@ files:
|
|
734
759
|
- vendored/puppet/lib/puppet/functions/length.rb
|
735
760
|
- vendored/puppet/lib/puppet/functions/lest.rb
|
736
761
|
- vendored/puppet/lib/puppet/functions/lookup.rb
|
762
|
+
- vendored/puppet/lib/puppet/functions/lstrip.rb
|
737
763
|
- vendored/puppet/lib/puppet/functions/map.rb
|
738
764
|
- vendored/puppet/lib/puppet/functions/match.rb
|
765
|
+
- vendored/puppet/lib/puppet/functions/max.rb
|
766
|
+
- vendored/puppet/lib/puppet/functions/min.rb
|
739
767
|
- vendored/puppet/lib/puppet/functions/module_directory.rb
|
740
768
|
- vendored/puppet/lib/puppet/functions/new.rb
|
741
769
|
- vendored/puppet/lib/puppet/functions/next.rb
|
@@ -745,16 +773,22 @@ files:
|
|
745
773
|
- vendored/puppet/lib/puppet/functions/require.rb
|
746
774
|
- vendored/puppet/lib/puppet/functions/return.rb
|
747
775
|
- vendored/puppet/lib/puppet/functions/reverse_each.rb
|
776
|
+
- vendored/puppet/lib/puppet/functions/round.rb
|
777
|
+
- vendored/puppet/lib/puppet/functions/rstrip.rb
|
748
778
|
- vendored/puppet/lib/puppet/functions/scanf.rb
|
779
|
+
- vendored/puppet/lib/puppet/functions/size.rb
|
749
780
|
- vendored/puppet/lib/puppet/functions/slice.rb
|
781
|
+
- vendored/puppet/lib/puppet/functions/sort.rb
|
750
782
|
- vendored/puppet/lib/puppet/functions/split.rb
|
751
783
|
- vendored/puppet/lib/puppet/functions/step.rb
|
752
784
|
- vendored/puppet/lib/puppet/functions/strftime.rb
|
785
|
+
- vendored/puppet/lib/puppet/functions/strip.rb
|
753
786
|
- vendored/puppet/lib/puppet/functions/then.rb
|
754
787
|
- vendored/puppet/lib/puppet/functions/tree_each.rb
|
755
788
|
- vendored/puppet/lib/puppet/functions/type.rb
|
756
789
|
- vendored/puppet/lib/puppet/functions/unique.rb
|
757
790
|
- vendored/puppet/lib/puppet/functions/unwrap.rb
|
791
|
+
- vendored/puppet/lib/puppet/functions/upcase.rb
|
758
792
|
- vendored/puppet/lib/puppet/functions/values.rb
|
759
793
|
- vendored/puppet/lib/puppet/functions/versioncmp.rb
|
760
794
|
- vendored/puppet/lib/puppet/functions/warning.rb
|
@@ -922,8 +956,6 @@ files:
|
|
922
956
|
- vendored/puppet/lib/puppet/network/formats.rb
|
923
957
|
- vendored/puppet/lib/puppet/network/http.rb
|
924
958
|
- vendored/puppet/lib/puppet/network/http/api.rb
|
925
|
-
- vendored/puppet/lib/puppet/network/http/api/ca.rb
|
926
|
-
- vendored/puppet/lib/puppet/network/http/api/ca/v1.rb
|
927
959
|
- vendored/puppet/lib/puppet/network/http/api/indirected_routes.rb
|
928
960
|
- vendored/puppet/lib/puppet/network/http/api/indirection_type.rb
|
929
961
|
- vendored/puppet/lib/puppet/network/http/api/master.rb
|
@@ -940,20 +972,15 @@ files:
|
|
940
972
|
- vendored/puppet/lib/puppet/network/http/memory_response.rb
|
941
973
|
- vendored/puppet/lib/puppet/network/http/nocache_pool.rb
|
942
974
|
- vendored/puppet/lib/puppet/network/http/pool.rb
|
943
|
-
- vendored/puppet/lib/puppet/network/http/rack.rb
|
944
|
-
- vendored/puppet/lib/puppet/network/http/rack/rest.rb
|
945
975
|
- vendored/puppet/lib/puppet/network/http/request.rb
|
946
976
|
- vendored/puppet/lib/puppet/network/http/response.rb
|
947
977
|
- vendored/puppet/lib/puppet/network/http/route.rb
|
948
978
|
- vendored/puppet/lib/puppet/network/http/session.rb
|
949
979
|
- vendored/puppet/lib/puppet/network/http/site.rb
|
950
|
-
- vendored/puppet/lib/puppet/network/http/webrick.rb
|
951
|
-
- vendored/puppet/lib/puppet/network/http/webrick/rest.rb
|
952
980
|
- vendored/puppet/lib/puppet/network/http_pool.rb
|
953
981
|
- vendored/puppet/lib/puppet/network/resolver.rb
|
954
982
|
- vendored/puppet/lib/puppet/network/rest_controller.rb
|
955
983
|
- vendored/puppet/lib/puppet/network/rights.rb
|
956
|
-
- vendored/puppet/lib/puppet/network/server.rb
|
957
984
|
- vendored/puppet/lib/puppet/node.rb
|
958
985
|
- vendored/puppet/lib/puppet/node/environment.rb
|
959
986
|
- vendored/puppet/lib/puppet/node/facts.rb
|
@@ -1349,6 +1376,11 @@ files:
|
|
1349
1376
|
- vendored/puppet/lib/puppet/resource/status.rb
|
1350
1377
|
- vendored/puppet/lib/puppet/resource/type.rb
|
1351
1378
|
- vendored/puppet/lib/puppet/resource/type_collection.rb
|
1379
|
+
- vendored/puppet/lib/puppet/rest/client.rb
|
1380
|
+
- vendored/puppet/lib/puppet/rest/errors.rb
|
1381
|
+
- vendored/puppet/lib/puppet/rest/response.rb
|
1382
|
+
- vendored/puppet/lib/puppet/rest/route.rb
|
1383
|
+
- vendored/puppet/lib/puppet/rest/routes.rb
|
1352
1384
|
- vendored/puppet/lib/puppet/scheduler.rb
|
1353
1385
|
- vendored/puppet/lib/puppet/scheduler/job.rb
|
1354
1386
|
- vendored/puppet/lib/puppet/scheduler/scheduler.rb
|
@@ -1388,7 +1420,6 @@ files:
|
|
1388
1420
|
- vendored/puppet/lib/puppet/ssl/certificate_request_attributes.rb
|
1389
1421
|
- vendored/puppet/lib/puppet/ssl/certificate_revocation_list.rb
|
1390
1422
|
- vendored/puppet/lib/puppet/ssl/certificate_signer.rb
|
1391
|
-
- vendored/puppet/lib/puppet/ssl/configuration.rb
|
1392
1423
|
- vendored/puppet/lib/puppet/ssl/digest.rb
|
1393
1424
|
- vendored/puppet/lib/puppet/ssl/host.rb
|
1394
1425
|
- vendored/puppet/lib/puppet/ssl/inventory.rb
|
@@ -1500,6 +1531,7 @@ files:
|
|
1500
1531
|
- vendored/puppet/lib/puppet/util/http_proxy.rb
|
1501
1532
|
- vendored/puppet/lib/puppet/util/inifile.rb
|
1502
1533
|
- vendored/puppet/lib/puppet/util/instance_loader.rb
|
1534
|
+
- vendored/puppet/lib/puppet/util/json.rb
|
1503
1535
|
- vendored/puppet/lib/puppet/util/json_lockfile.rb
|
1504
1536
|
- vendored/puppet/lib/puppet/util/ldap.rb
|
1505
1537
|
- vendored/puppet/lib/puppet/util/ldap/connection.rb
|
@@ -1513,7 +1545,6 @@ files:
|
|
1513
1545
|
- vendored/puppet/lib/puppet/util/log/destinations.rb
|
1514
1546
|
- vendored/puppet/lib/puppet/util/logging.rb
|
1515
1547
|
- vendored/puppet/lib/puppet/util/metaid.rb
|
1516
|
-
- vendored/puppet/lib/puppet/util/methodhelper.rb
|
1517
1548
|
- vendored/puppet/lib/puppet/util/metric.rb
|
1518
1549
|
- vendored/puppet/lib/puppet/util/monkey_patches.rb
|
1519
1550
|
- vendored/puppet/lib/puppet/util/multi_match.rb
|
@@ -1600,24 +1631,11 @@ files:
|
|
1600
1631
|
- vendored/puppet/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb
|
1601
1632
|
- vendored/puppet/lib/puppet/vendor/load_deep_merge.rb
|
1602
1633
|
- vendored/puppet/lib/puppet/vendor/load_pathspec.rb
|
1603
|
-
- vendored/puppet/lib/puppet/vendor/load_semantic.rb
|
1604
|
-
- vendored/puppet/lib/puppet/vendor/load_semantic_puppet.rb
|
1605
1634
|
- vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec.rb
|
1606
1635
|
- vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb
|
1607
1636
|
- vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb
|
1608
1637
|
- vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/spec.rb
|
1609
1638
|
- vendored/puppet/lib/puppet/vendor/require_vendored.rb
|
1610
|
-
- vendored/puppet/lib/puppet/vendor/semantic/lib/semantic.rb
|
1611
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb
|
1612
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency.rb
|
1613
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph.rb
|
1614
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph_node.rb
|
1615
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/module_release.rb
|
1616
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb
|
1617
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/unsatisfiable_graph.rb
|
1618
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb
|
1619
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb
|
1620
|
-
- vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb
|
1621
1639
|
- vendored/puppet/lib/puppet/version.rb
|
1622
1640
|
- vendored/puppet/lib/puppet_pal.rb
|
1623
1641
|
- vendored/puppet/lib/puppet_x.rb
|
@@ -1,317 +0,0 @@
|
|
1
|
-
require 'puppet/application'
|
2
|
-
require 'puppet/daemon'
|
3
|
-
require 'puppet/util/pidlock'
|
4
|
-
|
5
|
-
class Puppet::Application::Master < Puppet::Application
|
6
|
-
|
7
|
-
run_mode :master
|
8
|
-
|
9
|
-
option("--debug", "-d")
|
10
|
-
option("--verbose", "-v")
|
11
|
-
|
12
|
-
# internal option, only to be used by ext/rack/config.ru
|
13
|
-
option("--rack")
|
14
|
-
|
15
|
-
option("--compile host", "-c host") do |arg|
|
16
|
-
options[:node] = arg
|
17
|
-
end
|
18
|
-
|
19
|
-
option("--logdest DEST", "-l DEST") do |arg|
|
20
|
-
handle_logdest_arg(arg)
|
21
|
-
end
|
22
|
-
|
23
|
-
option("--parseonly") do |args|
|
24
|
-
puts "--parseonly has been removed. Please use 'puppet parser validate <manifest>'"
|
25
|
-
exit 1
|
26
|
-
end
|
27
|
-
|
28
|
-
def summary
|
29
|
-
_("The puppet master daemon")
|
30
|
-
end
|
31
|
-
|
32
|
-
def help
|
33
|
-
<<-HELP
|
34
|
-
|
35
|
-
puppet-master(8) -- #{summary}
|
36
|
-
========
|
37
|
-
|
38
|
-
SYNOPSIS
|
39
|
-
--------
|
40
|
-
The central puppet server. Functions as a certificate authority by
|
41
|
-
default.
|
42
|
-
|
43
|
-
|
44
|
-
USAGE
|
45
|
-
-----
|
46
|
-
puppet master [-D|--daemonize|--no-daemonize] [-d|--debug] [-h|--help]
|
47
|
-
[-l|--logdest syslog|<FILE>|console] [-v|--verbose] [-V|--version]
|
48
|
-
[--compile <NODE-NAME>]
|
49
|
-
|
50
|
-
|
51
|
-
DESCRIPTION
|
52
|
-
-----------
|
53
|
-
This command starts an instance of puppet master, running as a daemon
|
54
|
-
and using Ruby's built-in Webrick webserver. Puppet master can also be
|
55
|
-
managed by other application servers; when this is the case, this
|
56
|
-
executable is not used.
|
57
|
-
|
58
|
-
|
59
|
-
OPTIONS
|
60
|
-
-------
|
61
|
-
|
62
|
-
Note that any Puppet setting that's valid in the configuration file is also a
|
63
|
-
valid long argument. For example, 'server' is a valid setting, so you can
|
64
|
-
specify '--server <servername>' as an argument. Boolean settings translate into
|
65
|
-
'--setting' and '--no-setting' pairs.
|
66
|
-
|
67
|
-
See the configuration file documentation at
|
68
|
-
https://docs.puppetlabs.com/puppet/latest/reference/configuration.html for the
|
69
|
-
full list of acceptable settings. A commented list of all settings can also be
|
70
|
-
generated by running puppet master with '--genconfig'.
|
71
|
-
|
72
|
-
* --daemonize:
|
73
|
-
Send the process into the background. This is the default.
|
74
|
-
(This is a Puppet setting, and can go in puppet.conf. Note the special 'no-'
|
75
|
-
prefix for boolean settings on the command line.)
|
76
|
-
|
77
|
-
* --no-daemonize:
|
78
|
-
Do not send the process into the background.
|
79
|
-
(This is a Puppet setting, and can go in puppet.conf. Note the special 'no-'
|
80
|
-
prefix for boolean settings on the command line.)
|
81
|
-
|
82
|
-
* --debug:
|
83
|
-
Enable full debugging.
|
84
|
-
|
85
|
-
* --help:
|
86
|
-
Print this help message.
|
87
|
-
|
88
|
-
* --logdest:
|
89
|
-
Where to send log messages. Choose between 'syslog' (the POSIX syslog
|
90
|
-
service), 'console', or the path to a log file. If debugging or verbosity is
|
91
|
-
enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog'.
|
92
|
-
|
93
|
-
A path ending with '.json' will receive structured output in JSON format. The
|
94
|
-
log file will not have an ending ']' automatically written to it due to the
|
95
|
-
appending nature of logging. It must be appended manually to make the content
|
96
|
-
valid JSON.
|
97
|
-
|
98
|
-
* --masterport:
|
99
|
-
The port on which to listen for traffic. The default port is 8140.
|
100
|
-
(This is a Puppet setting, and can go in puppet.conf.)
|
101
|
-
|
102
|
-
* --verbose:
|
103
|
-
Enable verbosity.
|
104
|
-
|
105
|
-
* --version:
|
106
|
-
Print the puppet version number and exit.
|
107
|
-
|
108
|
-
* --compile:
|
109
|
-
Compile a catalogue and output it in JSON from the puppet master. Uses
|
110
|
-
facts contained in the $vardir/yaml/ directory to compile the catalog.
|
111
|
-
|
112
|
-
|
113
|
-
EXAMPLE
|
114
|
-
-------
|
115
|
-
puppet master
|
116
|
-
|
117
|
-
DIAGNOSTICS
|
118
|
-
-----------
|
119
|
-
|
120
|
-
When running as a standalone daemon, puppet master accepts the
|
121
|
-
following signals:
|
122
|
-
|
123
|
-
* SIGHUP:
|
124
|
-
Restart the puppet master server.
|
125
|
-
* SIGINT and SIGTERM:
|
126
|
-
Shut down the puppet master server.
|
127
|
-
* SIGUSR2:
|
128
|
-
Close file descriptors for log files and reopen them. Used with logrotate.
|
129
|
-
|
130
|
-
AUTHOR
|
131
|
-
------
|
132
|
-
Luke Kanies
|
133
|
-
|
134
|
-
|
135
|
-
COPYRIGHT
|
136
|
-
---------
|
137
|
-
Copyright (c) 2012 Puppet Inc., LLC Licensed under the Apache 2.0 License
|
138
|
-
|
139
|
-
HELP
|
140
|
-
end
|
141
|
-
|
142
|
-
def app_defaults
|
143
|
-
super.merge({
|
144
|
-
:facts_terminus => 'yaml'
|
145
|
-
})
|
146
|
-
end
|
147
|
-
|
148
|
-
def preinit
|
149
|
-
Signal.trap(:INT) do
|
150
|
-
$stderr.puts _("Canceling startup")
|
151
|
-
exit(0)
|
152
|
-
end
|
153
|
-
|
154
|
-
# save ARGV to protect us from it being smashed later by something
|
155
|
-
@argv = ARGV.dup
|
156
|
-
end
|
157
|
-
|
158
|
-
def run_command
|
159
|
-
if options[:node]
|
160
|
-
compile
|
161
|
-
else
|
162
|
-
main
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
def compile
|
167
|
-
begin
|
168
|
-
unless catalog = Puppet::Resource::Catalog.indirection.find(options[:node])
|
169
|
-
raise _("Could not compile catalog for %{node}") % { node: options[:node] }
|
170
|
-
end
|
171
|
-
|
172
|
-
puts JSON::pretty_generate(catalog.to_resource, :allow_nan => true, :max_nesting => false)
|
173
|
-
rescue => detail
|
174
|
-
Puppet.log_exception(detail, _("Failed to compile catalog for node %{node}: %{detail}") % { node: options[:node], detail: detail })
|
175
|
-
exit(30)
|
176
|
-
end
|
177
|
-
exit(0)
|
178
|
-
end
|
179
|
-
|
180
|
-
def main
|
181
|
-
require 'etc'
|
182
|
-
# Make sure we've got a localhost ssl cert
|
183
|
-
Puppet::SSL::Host.localhost
|
184
|
-
|
185
|
-
# And now configure our server to *only* hit the CA for data, because that's
|
186
|
-
# all it will have write access to.
|
187
|
-
Puppet::SSL::Host.ca_location = :only if Puppet::SSL::CertificateAuthority.ca?
|
188
|
-
|
189
|
-
if Puppet.features.root?
|
190
|
-
if Puppet::Type.type(:user).new(:name => Puppet[:user]).exists?
|
191
|
-
begin
|
192
|
-
Puppet::Util.chuser
|
193
|
-
rescue => detail
|
194
|
-
Puppet.log_exception(detail, _("Could not change user to %{user}: %{detail}") % { user: Puppet[:user], detail: detail })
|
195
|
-
exit(39)
|
196
|
-
end
|
197
|
-
else
|
198
|
-
Puppet.err(_("Could not change user to %{user}. User does not exist and is required to continue.") % { user: Puppet[:user] })
|
199
|
-
exit(74)
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
if options[:rack]
|
204
|
-
Puppet.deprecation_warning(_("The Rack Puppet master server is deprecated and will be removed in a future release. Please use Puppet Server instead. See http://links.puppet.com/deprecate-rack-webrick-servers for more information."))
|
205
|
-
start_rack_master
|
206
|
-
else
|
207
|
-
Puppet.deprecation_warning(_("The WEBrick Puppet master server is deprecated and will be removed in a future release. Please use Puppet Server instead. See http://links.puppet.com/deprecate-rack-webrick-servers for more information."))
|
208
|
-
start_webrick_master
|
209
|
-
end
|
210
|
-
end
|
211
|
-
|
212
|
-
def setup_logs
|
213
|
-
set_log_level
|
214
|
-
|
215
|
-
if !options[:setdest]
|
216
|
-
if options[:node]
|
217
|
-
# We are compiling a catalog for a single node with '--compile' and logging
|
218
|
-
# has not already been configured via '--logdest' so log to the console.
|
219
|
-
Puppet::Util::Log.newdestination(:console)
|
220
|
-
elsif !(Puppet[:daemonize] or options[:rack])
|
221
|
-
# We are running a webrick master which has been explicitly foregrounded
|
222
|
-
# and '--logdest' has not been passed, assume users want to see logging
|
223
|
-
# and log to the console.
|
224
|
-
Puppet::Util::Log.newdestination(:console)
|
225
|
-
else
|
226
|
-
# No explicit log destination has been given with '--logdest' and we're
|
227
|
-
# either a daemonized webrick master or running under rack, log to syslog.
|
228
|
-
Puppet::Util::Log.newdestination(:syslog)
|
229
|
-
end
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
def setup_terminuses
|
234
|
-
require 'puppet/file_serving/content'
|
235
|
-
require 'puppet/file_serving/metadata'
|
236
|
-
|
237
|
-
Puppet::FileServing::Content.indirection.terminus_class = :file_server
|
238
|
-
Puppet::FileServing::Metadata.indirection.terminus_class = :file_server
|
239
|
-
|
240
|
-
Puppet::FileBucket::File.indirection.terminus_class = :file
|
241
|
-
end
|
242
|
-
|
243
|
-
def setup_ssl
|
244
|
-
# Configure all of the SSL stuff.
|
245
|
-
if Puppet::SSL::CertificateAuthority.ca?
|
246
|
-
Puppet::SSL::Host.ca_location = :local
|
247
|
-
Puppet.settings.use :ca
|
248
|
-
Puppet::SSL::CertificateAuthority.instance
|
249
|
-
else
|
250
|
-
Puppet::SSL::Host.ca_location = :none
|
251
|
-
end
|
252
|
-
Puppet::SSL::Oids.register_puppet_oids
|
253
|
-
Puppet::SSL::Oids.load_custom_oid_file(Puppet[:trusted_oid_mapping_file])
|
254
|
-
end
|
255
|
-
|
256
|
-
# Honor the :node_cache_terminus setting if users have specified it directly.
|
257
|
-
# We normally want this nil as use-cases for querying nodes should be going to
|
258
|
-
# PuppetDB.
|
259
|
-
# @see PUP-6060
|
260
|
-
# @return [void]
|
261
|
-
def setup_node_cache
|
262
|
-
Puppet::Node.indirection.cache_class = Puppet[:node_cache_terminus]
|
263
|
-
end
|
264
|
-
|
265
|
-
def setup
|
266
|
-
raise Puppet::Error.new(_("Puppet master is not supported on Microsoft Windows")) if Puppet.features.microsoft_windows?
|
267
|
-
|
268
|
-
setup_logs
|
269
|
-
|
270
|
-
exit(Puppet.settings.print_configs ? 0 : 1) if Puppet.settings.print_configs?
|
271
|
-
|
272
|
-
Puppet.settings.use :main, :master, :ssl, :metrics
|
273
|
-
|
274
|
-
setup_terminuses
|
275
|
-
|
276
|
-
setup_node_cache
|
277
|
-
|
278
|
-
setup_ssl
|
279
|
-
end
|
280
|
-
|
281
|
-
private
|
282
|
-
|
283
|
-
# Start a master that will be using WeBrick.
|
284
|
-
#
|
285
|
-
# This method will block until the master exits.
|
286
|
-
def start_webrick_master
|
287
|
-
require 'puppet/network/server'
|
288
|
-
daemon = Puppet::Daemon.new(Puppet::Util::Pidlock.new(Puppet[:pidfile]))
|
289
|
-
|
290
|
-
daemon.argv = @argv
|
291
|
-
daemon.server = Puppet::Network::Server.new(Puppet[:bindaddress], Puppet[:masterport])
|
292
|
-
daemon.daemonize if Puppet[:daemonize]
|
293
|
-
|
294
|
-
# Setup signal traps immediately after daemonization so we clean up the daemon
|
295
|
-
daemon.set_signal_traps
|
296
|
-
|
297
|
-
announce_start_of_master
|
298
|
-
|
299
|
-
daemon.start
|
300
|
-
end
|
301
|
-
|
302
|
-
# Start a master that will be used for a Rack container.
|
303
|
-
#
|
304
|
-
# This method immediately returns the Rack handler that must be returned to
|
305
|
-
# the calling Rack container
|
306
|
-
def start_rack_master
|
307
|
-
require 'puppet/network/http/rack'
|
308
|
-
|
309
|
-
announce_start_of_master
|
310
|
-
|
311
|
-
return Puppet::Network::HTTP::Rack.new()
|
312
|
-
end
|
313
|
-
|
314
|
-
def announce_start_of_master
|
315
|
-
Puppet.notice _("Starting Puppet master version %{version}") % { version: Puppet.version }
|
316
|
-
end
|
317
|
-
end
|