bolt 0.20.0 → 0.20.2
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/lib/bolt/cli.rb +5 -0
- data/lib/bolt/puppetdb/client.rb +1 -1
- data/lib/bolt/transport/ssh.rb +1 -1
- data/lib/bolt/util/on_access.rb +4 -2
- data/lib/bolt/version.rb +1 -1
- data/vendored/facter/lib/facter.rb +261 -0
- data/vendored/facter/lib/facter/Cfkey.rb +42 -0
- data/vendored/facter/lib/facter/application.rb +206 -0
- data/vendored/facter/lib/facter/architecture.rb +50 -0
- data/vendored/facter/lib/facter/augeasversion.rb +28 -0
- data/vendored/facter/lib/facter/blockdevices.rb +105 -0
- data/vendored/facter/lib/facter/core/aggregate.rb +220 -0
- data/vendored/facter/lib/facter/core/directed_graph.rb +46 -0
- data/vendored/facter/lib/facter/core/execution.rb +123 -0
- data/vendored/facter/lib/facter/core/execution/base.rb +81 -0
- data/vendored/facter/lib/facter/core/execution/posix.rb +50 -0
- data/vendored/facter/lib/facter/core/execution/windows.rb +57 -0
- data/vendored/facter/lib/facter/core/logging.rb +197 -0
- data/vendored/facter/lib/facter/core/resolvable.rb +94 -0
- data/vendored/facter/lib/facter/core/suitable.rb +113 -0
- data/vendored/facter/lib/facter/dhcp_servers.rb +45 -0
- data/vendored/facter/lib/facter/domain.rb +99 -0
- data/vendored/facter/lib/facter/ec2.rb +68 -0
- data/vendored/facter/lib/facter/ec2/rest.rb +137 -0
- data/vendored/facter/lib/facter/facterversion.rb +15 -0
- data/vendored/facter/lib/facter/filesystems.rb +45 -0
- data/vendored/facter/lib/facter/fqdn.rb +24 -0
- data/vendored/facter/lib/facter/gce.rb +16 -0
- data/vendored/facter/lib/facter/gce/metadata.rb +87 -0
- data/vendored/facter/lib/facter/gid.rb +25 -0
- data/vendored/facter/lib/facter/hardwareisa.rb +20 -0
- data/vendored/facter/lib/facter/hardwaremodel.rb +67 -0
- data/vendored/facter/lib/facter/hostname.rb +31 -0
- data/vendored/facter/lib/facter/id.rb +21 -0
- data/vendored/facter/lib/facter/interfaces.rb +58 -0
- data/vendored/facter/lib/facter/ipaddress.rb +169 -0
- data/vendored/facter/lib/facter/ipaddress6.rb +82 -0
- data/vendored/facter/lib/facter/iphostnumber.rb +29 -0
- data/vendored/facter/lib/facter/kernel.rb +22 -0
- data/vendored/facter/lib/facter/kernelmajversion.rb +23 -0
- data/vendored/facter/lib/facter/kernelrelease.rb +45 -0
- data/vendored/facter/lib/facter/kernelversion.rb +22 -0
- data/vendored/facter/lib/facter/ldom.rb +51 -0
- data/vendored/facter/lib/facter/lsbdistcodename.rb +20 -0
- data/vendored/facter/lib/facter/lsbdistdescription.rb +21 -0
- data/vendored/facter/lib/facter/lsbdistid.rb +20 -0
- data/vendored/facter/lib/facter/lsbdistrelease.rb +20 -0
- data/vendored/facter/lib/facter/lsbmajdistrelease.rb +22 -0
- data/vendored/facter/lib/facter/lsbminordistrelease.rb +22 -0
- data/vendored/facter/lib/facter/lsbrelease.rb +20 -0
- data/vendored/facter/lib/facter/macaddress.rb +99 -0
- data/vendored/facter/lib/facter/macosx.rb +56 -0
- data/vendored/facter/lib/facter/manufacturer.rb +68 -0
- data/vendored/facter/lib/facter/memory.rb +168 -0
- data/vendored/facter/lib/facter/netmask.rb +43 -0
- data/vendored/facter/lib/facter/network.rb +20 -0
- data/vendored/facter/lib/facter/operatingsystem.rb +24 -0
- data/vendored/facter/lib/facter/operatingsystem/base.rb +61 -0
- data/vendored/facter/lib/facter/operatingsystem/cumuluslinux.rb +27 -0
- data/vendored/facter/lib/facter/operatingsystem/implementation.rb +33 -0
- data/vendored/facter/lib/facter/operatingsystem/linux.rb +484 -0
- data/vendored/facter/lib/facter/operatingsystem/osreleaselinux.rb +28 -0
- data/vendored/facter/lib/facter/operatingsystem/sunos.rb +54 -0
- data/vendored/facter/lib/facter/operatingsystem/vmkernel.rb +11 -0
- data/vendored/facter/lib/facter/operatingsystem/windows.rb +43 -0
- data/vendored/facter/lib/facter/operatingsystemmajrelease.rb +31 -0
- data/vendored/facter/lib/facter/operatingsystemrelease.rb +29 -0
- data/vendored/facter/lib/facter/os.rb +98 -0
- data/vendored/facter/lib/facter/osfamily.rb +18 -0
- data/vendored/facter/lib/facter/partitions.rb +39 -0
- data/vendored/facter/lib/facter/path.rb +14 -0
- data/vendored/facter/lib/facter/physicalprocessorcount.rb +27 -0
- data/vendored/facter/lib/facter/processor.rb +52 -0
- data/vendored/facter/lib/facter/processors.rb +66 -0
- data/vendored/facter/lib/facter/processors/os.rb +244 -0
- data/vendored/facter/lib/facter/ps.rb +31 -0
- data/vendored/facter/lib/facter/puppetversion.rb +20 -0
- data/vendored/facter/lib/facter/rackspace.rb +37 -0
- data/vendored/facter/lib/facter/rubyplatform.rb +12 -0
- data/vendored/facter/lib/facter/rubysitedir.rb +15 -0
- data/vendored/facter/lib/facter/rubyversion.rb +12 -0
- data/vendored/facter/lib/facter/selinux.rb +154 -0
- data/vendored/facter/lib/facter/ssh.rb +73 -0
- data/vendored/facter/lib/facter/system32.rb +21 -0
- data/vendored/facter/lib/facter/system_uptime.rb +44 -0
- data/vendored/facter/lib/facter/timezone.rb +14 -0
- data/vendored/facter/lib/facter/uniqueid.rb +4 -0
- data/vendored/facter/lib/facter/uptime.rb +16 -0
- data/vendored/facter/lib/facter/uptime_days.rb +13 -0
- data/vendored/facter/lib/facter/uptime_hours.rb +13 -0
- data/vendored/facter/lib/facter/uptime_seconds.rb +20 -0
- data/vendored/facter/lib/facter/util/architecture.rb +19 -0
- data/vendored/facter/lib/facter/util/collection.rb +161 -0
- data/vendored/facter/lib/facter/util/composite_loader.rb +12 -0
- data/vendored/facter/lib/facter/util/config.rb +88 -0
- data/vendored/facter/lib/facter/util/confine.rb +66 -0
- data/vendored/facter/lib/facter/util/dhcp_servers.rb +58 -0
- data/vendored/facter/lib/facter/util/directory_loader.rb +88 -0
- data/vendored/facter/lib/facter/util/ec2.rb +106 -0
- data/vendored/facter/lib/facter/util/fact.rb +204 -0
- data/vendored/facter/lib/facter/util/file_read.rb +37 -0
- data/vendored/facter/lib/facter/util/formatter.rb +39 -0
- data/vendored/facter/lib/facter/util/ip.rb +340 -0
- data/vendored/facter/lib/facter/util/ip/windows.rb +215 -0
- data/vendored/facter/lib/facter/util/loader.rb +155 -0
- data/vendored/facter/lib/facter/util/macaddress.rb +43 -0
- data/vendored/facter/lib/facter/util/macosx.rb +73 -0
- data/vendored/facter/lib/facter/util/manufacturer.rb +99 -0
- data/vendored/facter/lib/facter/util/memory.rb +228 -0
- data/vendored/facter/lib/facter/util/netmask.rb +40 -0
- data/vendored/facter/lib/facter/util/normalization.rb +94 -0
- data/vendored/facter/lib/facter/util/nothing_loader.rb +12 -0
- data/vendored/facter/lib/facter/util/operatingsystem.rb +21 -0
- data/vendored/facter/lib/facter/util/parser.rb +168 -0
- data/vendored/facter/lib/facter/util/partitions.rb +47 -0
- data/vendored/facter/lib/facter/util/partitions/linux.rb +71 -0
- data/vendored/facter/lib/facter/util/partitions/openbsd.rb +40 -0
- data/vendored/facter/lib/facter/util/plist.rb +24 -0
- data/vendored/facter/lib/facter/util/plist/generator.rb +228 -0
- data/vendored/facter/lib/facter/util/plist/parser.rb +226 -0
- data/vendored/facter/lib/facter/util/posix.rb +16 -0
- data/vendored/facter/lib/facter/util/processor.rb +289 -0
- data/vendored/facter/lib/facter/util/registry.rb +11 -0
- data/vendored/facter/lib/facter/util/resolution.rb +160 -0
- data/vendored/facter/lib/facter/util/solaris_zones.rb +158 -0
- data/vendored/facter/lib/facter/util/unix_root.rb +5 -0
- data/vendored/facter/lib/facter/util/uptime.rb +83 -0
- data/vendored/facter/lib/facter/util/values.rb +109 -0
- data/vendored/facter/lib/facter/util/virtual.rb +212 -0
- data/vendored/facter/lib/facter/util/vlans.rb +21 -0
- data/vendored/facter/lib/facter/util/windows.rb +10 -0
- data/vendored/facter/lib/facter/util/windows/api_types.rb +135 -0
- data/vendored/facter/lib/facter/util/windows/dir.rb +43 -0
- data/vendored/facter/lib/facter/util/windows/error.rb +87 -0
- data/vendored/facter/lib/facter/util/windows/process.rb +294 -0
- data/vendored/facter/lib/facter/util/windows/user.rb +186 -0
- data/vendored/facter/lib/facter/util/windows_root.rb +7 -0
- data/vendored/facter/lib/facter/util/wmi.rb +49 -0
- data/vendored/facter/lib/facter/util/xendomains.rb +28 -0
- data/vendored/facter/lib/facter/version.rb +86 -0
- data/vendored/facter/lib/facter/virtual.rb +330 -0
- data/vendored/facter/lib/facter/vlans.rb +17 -0
- data/vendored/facter/lib/facter/xendomains.rb +20 -0
- data/vendored/facter/lib/facter/zfs_version.rb +14 -0
- data/vendored/facter/lib/facter/zonename.rb +6 -0
- data/vendored/facter/lib/facter/zones.rb +18 -0
- data/vendored/facter/lib/facter/zpool_version.rb +10 -0
- data/vendored/hiera/lib/hiera.rb +119 -0
- data/vendored/hiera/lib/hiera/backend.rb +360 -0
- data/vendored/hiera/lib/hiera/backend/json_backend.rb +58 -0
- data/vendored/hiera/lib/hiera/backend/yaml_backend.rb +63 -0
- data/vendored/hiera/lib/hiera/config.rb +97 -0
- data/vendored/hiera/lib/hiera/console_logger.rb +13 -0
- data/vendored/hiera/lib/hiera/error.rb +4 -0
- data/vendored/hiera/lib/hiera/fallback_logger.rb +41 -0
- data/vendored/hiera/lib/hiera/filecache.rb +86 -0
- data/vendored/hiera/lib/hiera/interpolate.rb +121 -0
- data/vendored/hiera/lib/hiera/noop_logger.rb +8 -0
- data/vendored/hiera/lib/hiera/puppet_logger.rb +17 -0
- data/vendored/hiera/lib/hiera/recursive_guard.rb +20 -0
- data/vendored/hiera/lib/hiera/util.rb +65 -0
- data/vendored/hiera/lib/hiera/util/win32.rb +40 -0
- data/vendored/hiera/lib/hiera/version.rb +89 -0
- data/vendored/puppet/lib/hiera/puppet_function.rb +84 -0
- data/vendored/puppet/lib/hiera/scope.rb +61 -0
- data/vendored/puppet/lib/hiera_puppet.rb +79 -0
- data/vendored/puppet/lib/puppet.rb +307 -0
- data/vendored/puppet/lib/puppet/agent.rb +134 -0
- data/vendored/puppet/lib/puppet/agent/disabler.rb +53 -0
- data/vendored/puppet/lib/puppet/agent/locker.rb +53 -0
- data/vendored/puppet/lib/puppet/application.rb +502 -0
- data/vendored/puppet/lib/puppet/application/agent.rb +473 -0
- data/vendored/puppet/lib/puppet/application/apply.rb +356 -0
- data/vendored/puppet/lib/puppet/application/ca.rb +11 -0
- data/vendored/puppet/lib/puppet/application/catalog.rb +4 -0
- data/vendored/puppet/lib/puppet/application/cert.rb +339 -0
- data/vendored/puppet/lib/puppet/application/certificate.rb +17 -0
- data/vendored/puppet/lib/puppet/application/certificate_request.rb +7 -0
- data/vendored/puppet/lib/puppet/application/certificate_revocation_list.rb +7 -0
- data/vendored/puppet/lib/puppet/application/config.rb +5 -0
- data/vendored/puppet/lib/puppet/application/describe.rb +257 -0
- data/vendored/puppet/lib/puppet/application/device.rb +378 -0
- data/vendored/puppet/lib/puppet/application/doc.rb +230 -0
- data/vendored/puppet/lib/puppet/application/epp.rb +5 -0
- data/vendored/puppet/lib/puppet/application/face_base.rb +268 -0
- data/vendored/puppet/lib/puppet/application/facts.rb +9 -0
- data/vendored/puppet/lib/puppet/application/filebucket.rb +300 -0
- data/vendored/puppet/lib/puppet/application/generate.rb +5 -0
- data/vendored/puppet/lib/puppet/application/help.rb +5 -0
- data/vendored/puppet/lib/puppet/application/indirection_base.rb +4 -0
- data/vendored/puppet/lib/puppet/application/key.rb +4 -0
- data/vendored/puppet/lib/puppet/application/lookup.rb +369 -0
- data/vendored/puppet/lib/puppet/application/man.rb +4 -0
- data/vendored/puppet/lib/puppet/application/master.rb +317 -0
- data/vendored/puppet/lib/puppet/application/module.rb +4 -0
- data/vendored/puppet/lib/puppet/application/node.rb +4 -0
- data/vendored/puppet/lib/puppet/application/parser.rb +5 -0
- data/vendored/puppet/lib/puppet/application/plugin.rb +3 -0
- data/vendored/puppet/lib/puppet/application/report.rb +4 -0
- data/vendored/puppet/lib/puppet/application/resource.rb +231 -0
- data/vendored/puppet/lib/puppet/application/script.rb +261 -0
- data/vendored/puppet/lib/puppet/application/status.rb +4 -0
- data/vendored/puppet/lib/puppet/application_support.rb +62 -0
- data/vendored/puppet/lib/puppet/coercion.rb +40 -0
- data/vendored/puppet/lib/puppet/compilable_resource_type.rb +15 -0
- data/vendored/puppet/lib/puppet/configurer.rb +464 -0
- data/vendored/puppet/lib/puppet/configurer/downloader.rb +67 -0
- data/vendored/puppet/lib/puppet/configurer/fact_handler.rb +46 -0
- data/vendored/puppet/lib/puppet/configurer/plugin_handler.rb +49 -0
- data/vendored/puppet/lib/puppet/confine.rb +80 -0
- data/vendored/puppet/lib/puppet/confine/any.rb +26 -0
- data/vendored/puppet/lib/puppet/confine/exists.rb +19 -0
- data/vendored/puppet/lib/puppet/confine/false.rb +19 -0
- data/vendored/puppet/lib/puppet/confine/feature.rb +17 -0
- data/vendored/puppet/lib/puppet/confine/true.rb +20 -0
- data/vendored/puppet/lib/puppet/confine/variable.rb +59 -0
- data/vendored/puppet/lib/puppet/confine_collection.rb +50 -0
- data/vendored/puppet/lib/puppet/confiner.rb +46 -0
- data/vendored/puppet/lib/puppet/context.rb +116 -0
- data/vendored/puppet/lib/puppet/context/trusted_information.rb +76 -0
- data/vendored/puppet/lib/puppet/daemon.rb +195 -0
- data/vendored/puppet/lib/puppet/data_binding.rb +14 -0
- data/vendored/puppet/lib/puppet/datatypes.rb +213 -0
- data/vendored/puppet/lib/puppet/datatypes/error.rb +21 -0
- data/vendored/puppet/lib/puppet/datatypes/impl/error.rb +40 -0
- data/vendored/puppet/lib/puppet/defaults.rb +2071 -0
- data/vendored/puppet/lib/puppet/environments.rb +511 -0
- data/vendored/puppet/lib/puppet/error.rb +110 -0
- data/vendored/puppet/lib/puppet/etc.rb +161 -0
- data/vendored/puppet/lib/puppet/external/dot.rb +319 -0
- data/vendored/puppet/lib/puppet/external/nagios.rb +46 -0
- data/vendored/puppet/lib/puppet/external/nagios/base.rb +472 -0
- data/vendored/puppet/lib/puppet/external/nagios/parser.rb +400 -0
- data/vendored/puppet/lib/puppet/external/pson/common.rb +374 -0
- data/vendored/puppet/lib/puppet/external/pson/pure.rb +15 -0
- data/vendored/puppet/lib/puppet/external/pson/pure/generator.rb +395 -0
- data/vendored/puppet/lib/puppet/external/pson/pure/parser.rb +307 -0
- data/vendored/puppet/lib/puppet/external/pson/version.rb +8 -0
- data/vendored/puppet/lib/puppet/face.rb +12 -0
- data/vendored/puppet/lib/puppet/face/ca.rb +266 -0
- data/vendored/puppet/lib/puppet/face/catalog.rb +130 -0
- data/vendored/puppet/lib/puppet/face/catalog/select.rb +49 -0
- data/vendored/puppet/lib/puppet/face/certificate.rb +165 -0
- data/vendored/puppet/lib/puppet/face/certificate_request.rb +56 -0
- data/vendored/puppet/lib/puppet/face/certificate_revocation_list.rb +56 -0
- data/vendored/puppet/lib/puppet/face/config.rb +210 -0
- data/vendored/puppet/lib/puppet/face/epp.rb +554 -0
- data/vendored/puppet/lib/puppet/face/facts.rb +87 -0
- data/vendored/puppet/lib/puppet/face/generate.rb +64 -0
- data/vendored/puppet/lib/puppet/face/help.rb +201 -0
- data/vendored/puppet/lib/puppet/face/key.rb +16 -0
- data/vendored/puppet/lib/puppet/face/man.rb +145 -0
- data/vendored/puppet/lib/puppet/face/module.rb +19 -0
- data/vendored/puppet/lib/puppet/face/module/build.rb +64 -0
- data/vendored/puppet/lib/puppet/face/module/changes.rb +42 -0
- data/vendored/puppet/lib/puppet/face/module/generate.rb +256 -0
- data/vendored/puppet/lib/puppet/face/module/install.rb +150 -0
- data/vendored/puppet/lib/puppet/face/module/list.rb +268 -0
- data/vendored/puppet/lib/puppet/face/module/search.rb +98 -0
- data/vendored/puppet/lib/puppet/face/module/uninstall.rb +93 -0
- data/vendored/puppet/lib/puppet/face/module/upgrade.rb +91 -0
- data/vendored/puppet/lib/puppet/face/node.rb +43 -0
- data/vendored/puppet/lib/puppet/face/node/clean.rb +96 -0
- data/vendored/puppet/lib/puppet/face/parser.rb +187 -0
- data/vendored/puppet/lib/puppet/face/plugin.rb +56 -0
- data/vendored/puppet/lib/puppet/face/report.rb +54 -0
- data/vendored/puppet/lib/puppet/face/resource.rb +53 -0
- data/vendored/puppet/lib/puppet/face/status.rb +51 -0
- data/vendored/puppet/lib/puppet/feature/base.rb +95 -0
- data/vendored/puppet/lib/puppet/feature/bolt.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/cfpropertylist.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/eventlog.rb +5 -0
- data/vendored/puppet/lib/puppet/feature/hiera_eyaml.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/hocon.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/libuser.rb +8 -0
- data/vendored/puppet/lib/puppet/feature/msgpack.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/pe_license.rb +4 -0
- data/vendored/puppet/lib/puppet/feature/rack.rb +19 -0
- data/vendored/puppet/lib/puppet/feature/selinux.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/ssh.rb +3 -0
- data/vendored/puppet/lib/puppet/feature/telnet.rb +9 -0
- data/vendored/puppet/lib/puppet/feature/zlib.rb +5 -0
- data/vendored/puppet/lib/puppet/file_bucket.rb +4 -0
- data/vendored/puppet/lib/puppet/file_bucket/dipper.rb +173 -0
- data/vendored/puppet/lib/puppet/file_bucket/file.rb +129 -0
- data/vendored/puppet/lib/puppet/file_serving.rb +3 -0
- data/vendored/puppet/lib/puppet/file_serving/base.rb +86 -0
- data/vendored/puppet/lib/puppet/file_serving/configuration.rb +115 -0
- data/vendored/puppet/lib/puppet/file_serving/configuration/parser.rb +137 -0
- data/vendored/puppet/lib/puppet/file_serving/content.rb +43 -0
- data/vendored/puppet/lib/puppet/file_serving/fileset.rb +174 -0
- data/vendored/puppet/lib/puppet/file_serving/http_metadata.rb +46 -0
- data/vendored/puppet/lib/puppet/file_serving/metadata.rb +163 -0
- data/vendored/puppet/lib/puppet/file_serving/mount.rb +39 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/file.rb +121 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/locales.rb +35 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/modules.rb +24 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/pluginfacts.rb +35 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/plugins.rb +35 -0
- data/vendored/puppet/lib/puppet/file_serving/mount/tasks.rb +21 -0
- data/vendored/puppet/lib/puppet/file_serving/terminus_helper.rb +31 -0
- data/vendored/puppet/lib/puppet/file_serving/terminus_selector.rb +32 -0
- data/vendored/puppet/lib/puppet/file_system.rb +404 -0
- data/vendored/puppet/lib/puppet/file_system/file_impl.rb +154 -0
- data/vendored/puppet/lib/puppet/file_system/memory_file.rb +66 -0
- data/vendored/puppet/lib/puppet/file_system/memory_impl.rb +86 -0
- data/vendored/puppet/lib/puppet/file_system/path_pattern.rb +98 -0
- data/vendored/puppet/lib/puppet/file_system/posix.rb +46 -0
- data/vendored/puppet/lib/puppet/file_system/uniquefile.rb +190 -0
- data/vendored/puppet/lib/puppet/file_system/windows.rb +130 -0
- data/vendored/puppet/lib/puppet/forge.rb +242 -0
- data/vendored/puppet/lib/puppet/forge/cache.rb +60 -0
- data/vendored/puppet/lib/puppet/forge/errors.rb +114 -0
- data/vendored/puppet/lib/puppet/forge/repository.rb +155 -0
- data/vendored/puppet/lib/puppet/functions.rb +725 -0
- data/vendored/puppet/lib/puppet/functions/alert.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/all.rb +104 -0
- data/vendored/puppet/lib/puppet/functions/annotate.rb +108 -0
- data/vendored/puppet/lib/puppet/functions/any.rb +109 -0
- data/vendored/puppet/lib/puppet/functions/assert_type.rb +93 -0
- data/vendored/puppet/lib/puppet/functions/binary_file.rb +32 -0
- data/vendored/puppet/lib/puppet/functions/break.rb +51 -0
- data/vendored/puppet/lib/puppet/functions/call.rb +42 -0
- data/vendored/puppet/lib/puppet/functions/contain.rb +55 -0
- data/vendored/puppet/lib/puppet/functions/convert_to.rb +33 -0
- data/vendored/puppet/lib/puppet/functions/crit.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/debug.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/defined.rb +159 -0
- data/vendored/puppet/lib/puppet/functions/dig.rb +47 -0
- data/vendored/puppet/lib/puppet/functions/each.rb +169 -0
- data/vendored/puppet/lib/puppet/functions/emerg.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/empty.rb +79 -0
- data/vendored/puppet/lib/puppet/functions/epp.rb +48 -0
- data/vendored/puppet/lib/puppet/functions/err.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/eyaml_lookup_key.rb +96 -0
- data/vendored/puppet/lib/puppet/functions/filter.rb +143 -0
- data/vendored/puppet/lib/puppet/functions/find_file.rb +44 -0
- data/vendored/puppet/lib/puppet/functions/flatten.rb +64 -0
- data/vendored/puppet/lib/puppet/functions/hiera.rb +88 -0
- data/vendored/puppet/lib/puppet/functions/hiera_array.rb +81 -0
- data/vendored/puppet/lib/puppet/functions/hiera_hash.rb +92 -0
- data/vendored/puppet/lib/puppet/functions/hiera_include.rb +104 -0
- data/vendored/puppet/lib/puppet/functions/hocon_data.rb +41 -0
- data/vendored/puppet/lib/puppet/functions/import.rb +7 -0
- data/vendored/puppet/lib/puppet/functions/include.rb +53 -0
- data/vendored/puppet/lib/puppet/functions/info.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/inline_epp.rb +59 -0
- data/vendored/puppet/lib/puppet/functions/join.rb +56 -0
- data/vendored/puppet/lib/puppet/functions/json_data.rb +33 -0
- data/vendored/puppet/lib/puppet/functions/keys.rb +25 -0
- data/vendored/puppet/lib/puppet/functions/length.rb +44 -0
- data/vendored/puppet/lib/puppet/functions/lest.rb +55 -0
- data/vendored/puppet/lib/puppet/functions/lookup.rb +223 -0
- data/vendored/puppet/lib/puppet/functions/map.rb +136 -0
- data/vendored/puppet/lib/puppet/functions/match.rb +120 -0
- data/vendored/puppet/lib/puppet/functions/module_directory.rb +41 -0
- data/vendored/puppet/lib/puppet/functions/new.rb +1022 -0
- data/vendored/puppet/lib/puppet/functions/next.rb +23 -0
- data/vendored/puppet/lib/puppet/functions/notice.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/reduce.rb +164 -0
- data/vendored/puppet/lib/puppet/functions/regsubst.rb +82 -0
- data/vendored/puppet/lib/puppet/functions/require.rb +77 -0
- data/vendored/puppet/lib/puppet/functions/return.rb +22 -0
- data/vendored/puppet/lib/puppet/functions/reverse_each.rb +94 -0
- data/vendored/puppet/lib/puppet/functions/scanf.rb +44 -0
- data/vendored/puppet/lib/puppet/functions/slice.rb +124 -0
- data/vendored/puppet/lib/puppet/functions/split.rb +49 -0
- data/vendored/puppet/lib/puppet/functions/step.rb +98 -0
- data/vendored/puppet/lib/puppet/functions/strftime.rb +217 -0
- data/vendored/puppet/lib/puppet/functions/then.rb +77 -0
- data/vendored/puppet/lib/puppet/functions/tree_each.rb +200 -0
- data/vendored/puppet/lib/puppet/functions/type.rb +72 -0
- data/vendored/puppet/lib/puppet/functions/unique.rb +132 -0
- data/vendored/puppet/lib/puppet/functions/unwrap.rb +44 -0
- data/vendored/puppet/lib/puppet/functions/values.rb +25 -0
- data/vendored/puppet/lib/puppet/functions/versioncmp.rb +36 -0
- data/vendored/puppet/lib/puppet/functions/warning.rb +14 -0
- data/vendored/puppet/lib/puppet/functions/with.rb +32 -0
- data/vendored/puppet/lib/puppet/functions/yaml_data.rb +42 -0
- data/vendored/puppet/lib/puppet/generate/models/type/property.rb +70 -0
- data/vendored/puppet/lib/puppet/generate/models/type/type.rb +62 -0
- data/vendored/puppet/lib/puppet/generate/type.rb +239 -0
- data/vendored/puppet/lib/puppet/gettext/config.rb +252 -0
- data/vendored/puppet/lib/puppet/gettext/module_translations.rb +42 -0
- data/vendored/puppet/lib/puppet/gettext/stubs.rb +11 -0
- data/vendored/puppet/lib/puppet/graph.rb +11 -0
- data/vendored/puppet/lib/puppet/graph/key.rb +26 -0
- data/vendored/puppet/lib/puppet/graph/prioritizer.rb +29 -0
- data/vendored/puppet/lib/puppet/graph/random_prioritizer.rb +16 -0
- data/vendored/puppet/lib/puppet/graph/rb_tree_map.rb +388 -0
- data/vendored/puppet/lib/puppet/graph/relationship_graph.rb +283 -0
- data/vendored/puppet/lib/puppet/graph/sequential_prioritizer.rb +31 -0
- data/vendored/puppet/lib/puppet/graph/simple_graph.rb +539 -0
- data/vendored/puppet/lib/puppet/graph/title_hash_prioritizer.rb +16 -0
- data/vendored/puppet/lib/puppet/indirector.rb +61 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/compiler.rb +418 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/json.rb +24 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/msgpack.rb +6 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/rest.rb +6 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/store_configs.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/catalog/yaml.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate/ca.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate/file.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/certificate/rest.rb +16 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_request/ca.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_request/file.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_request/memory.rb +6 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_request/rest.rb +10 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_revocation_list/ca.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_revocation_list/file.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_revocation_list/rest.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_status.rb +4 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_status/file.rb +91 -0
- data/vendored/puppet/lib/puppet/indirector/certificate_status/rest.rb +11 -0
- data/vendored/puppet/lib/puppet/indirector/code.rb +6 -0
- data/vendored/puppet/lib/puppet/indirector/data_binding/hiera.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/data_binding/none.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/direct_file_server.rb +17 -0
- data/vendored/puppet/lib/puppet/indirector/envelope.rb +11 -0
- data/vendored/puppet/lib/puppet/indirector/errors.rb +5 -0
- data/vendored/puppet/lib/puppet/indirector/exec.rb +38 -0
- data/vendored/puppet/lib/puppet/indirector/face.rb +153 -0
- data/vendored/puppet/lib/puppet/indirector/facts/facter.rb +88 -0
- data/vendored/puppet/lib/puppet/indirector/facts/memory.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/facts/network_device.rb +27 -0
- data/vendored/puppet/lib/puppet/indirector/facts/rest.rb +21 -0
- data/vendored/puppet/lib/puppet/indirector/facts/store_configs.rb +11 -0
- data/vendored/puppet/lib/puppet/indirector/facts/yaml.rb +82 -0
- data/vendored/puppet/lib/puppet/indirector/file_bucket_file/file.rb +262 -0
- data/vendored/puppet/lib/puppet/indirector/file_bucket_file/rest.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/file_bucket_file/selector.rb +53 -0
- data/vendored/puppet/lib/puppet/indirector/file_content.rb +5 -0
- data/vendored/puppet/lib/puppet/indirector/file_content/file.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/file_content/file_server.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/file_content/http.rb +17 -0
- data/vendored/puppet/lib/puppet/indirector/file_content/rest.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/file_content/selector.rb +30 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata.rb +5 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata/file.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata/file_server.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata/http.rb +27 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata/rest.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/file_metadata/selector.rb +30 -0
- data/vendored/puppet/lib/puppet/indirector/file_server.rb +59 -0
- data/vendored/puppet/lib/puppet/indirector/generic_http.rb +16 -0
- data/vendored/puppet/lib/puppet/indirector/hiera.rb +94 -0
- data/vendored/puppet/lib/puppet/indirector/indirection.rb +344 -0
- data/vendored/puppet/lib/puppet/indirector/json.rb +75 -0
- data/vendored/puppet/lib/puppet/indirector/key/ca.rb +16 -0
- data/vendored/puppet/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/vendored/puppet/lib/puppet/indirector/key/file.rb +50 -0
- data/vendored/puppet/lib/puppet/indirector/key/memory.rb +6 -0
- data/vendored/puppet/lib/puppet/indirector/ldap.rb +80 -0
- data/vendored/puppet/lib/puppet/indirector/memory.rb +34 -0
- data/vendored/puppet/lib/puppet/indirector/msgpack.rb +83 -0
- data/vendored/puppet/lib/puppet/indirector/node/exec.rb +71 -0
- data/vendored/puppet/lib/puppet/indirector/node/ldap.rb +275 -0
- data/vendored/puppet/lib/puppet/indirector/node/memory.rb +10 -0
- data/vendored/puppet/lib/puppet/indirector/node/msgpack.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/node/plain.rb +21 -0
- data/vendored/puppet/lib/puppet/indirector/node/rest.rb +7 -0
- data/vendored/puppet/lib/puppet/indirector/node/store_configs.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/node/write_only_yaml.rb +39 -0
- data/vendored/puppet/lib/puppet/indirector/node/yaml.rb +13 -0
- data/vendored/puppet/lib/puppet/indirector/none.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/plain.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/report/msgpack.rb +11 -0
- data/vendored/puppet/lib/puppet/indirector/report/processor.rb +59 -0
- data/vendored/puppet/lib/puppet/indirector/report/rest.rb +28 -0
- data/vendored/puppet/lib/puppet/indirector/report/yaml.rb +11 -0
- data/vendored/puppet/lib/puppet/indirector/request.rb +278 -0
- data/vendored/puppet/lib/puppet/indirector/resource/ral.rb +63 -0
- data/vendored/puppet/lib/puppet/indirector/resource/store_configs.rb +12 -0
- data/vendored/puppet/lib/puppet/indirector/resource/validator.rb +8 -0
- data/vendored/puppet/lib/puppet/indirector/rest.rb +350 -0
- data/vendored/puppet/lib/puppet/indirector/ssl_file.rb +201 -0
- data/vendored/puppet/lib/puppet/indirector/status.rb +3 -0
- data/vendored/puppet/lib/puppet/indirector/status/local.rb +12 -0
- data/vendored/puppet/lib/puppet/indirector/status/rest.rb +9 -0
- data/vendored/puppet/lib/puppet/indirector/store_configs.rb +30 -0
- data/vendored/puppet/lib/puppet/indirector/terminus.rb +169 -0
- data/vendored/puppet/lib/puppet/indirector/yaml.rb +63 -0
- data/vendored/puppet/lib/puppet/info_service.rb +17 -0
- data/vendored/puppet/lib/puppet/info_service/class_information_service.rb +110 -0
- data/vendored/puppet/lib/puppet/info_service/task_information_service.rb +32 -0
- data/vendored/puppet/lib/puppet/interface.rb +237 -0
- data/vendored/puppet/lib/puppet/interface/action.rb +402 -0
- data/vendored/puppet/lib/puppet/interface/action_builder.rb +166 -0
- data/vendored/puppet/lib/puppet/interface/action_manager.rb +97 -0
- data/vendored/puppet/lib/puppet/interface/documentation.rb +353 -0
- data/vendored/puppet/lib/puppet/interface/face_collection.rb +132 -0
- data/vendored/puppet/lib/puppet/interface/option.rb +171 -0
- data/vendored/puppet/lib/puppet/interface/option_builder.rb +105 -0
- data/vendored/puppet/lib/puppet/interface/option_manager.rb +104 -0
- data/vendored/puppet/lib/puppet/loaders.rb +27 -0
- data/vendored/puppet/lib/puppet/metatype/manager.rb +199 -0
- data/vendored/puppet/lib/puppet/module.rb +467 -0
- data/vendored/puppet/lib/puppet/module/task.rb +90 -0
- data/vendored/puppet/lib/puppet/module_tool.rb +196 -0
- data/vendored/puppet/lib/puppet/module_tool/applications.rb +14 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/application.rb +90 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/builder.rb +152 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/checksummer.rb +62 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/installer.rb +355 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/searcher.rb +29 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/uninstaller.rb +121 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/unpacker.rb +100 -0
- data/vendored/puppet/lib/puppet/module_tool/applications/upgrader.rb +281 -0
- data/vendored/puppet/lib/puppet/module_tool/checksums.rb +49 -0
- data/vendored/puppet/lib/puppet/module_tool/contents_description.rb +88 -0
- data/vendored/puppet/lib/puppet/module_tool/dependency.rb +41 -0
- data/vendored/puppet/lib/puppet/module_tool/errors.rb +11 -0
- data/vendored/puppet/lib/puppet/module_tool/errors/base.rb +15 -0
- data/vendored/puppet/lib/puppet/module_tool/errors/installer.rb +93 -0
- data/vendored/puppet/lib/puppet/module_tool/errors/shared.rb +195 -0
- data/vendored/puppet/lib/puppet/module_tool/errors/uninstaller.rb +50 -0
- data/vendored/puppet/lib/puppet/module_tool/errors/upgrader.rb +63 -0
- data/vendored/puppet/lib/puppet/module_tool/install_directory.rb +45 -0
- data/vendored/puppet/lib/puppet/module_tool/installed_modules.rb +96 -0
- data/vendored/puppet/lib/puppet/module_tool/local_tarball.rb +90 -0
- data/vendored/puppet/lib/puppet/module_tool/metadata.rb +223 -0
- data/vendored/puppet/lib/puppet/module_tool/shared_behaviors.rb +180 -0
- data/vendored/puppet/lib/puppet/module_tool/skeleton/templates/generator/spec/spec_helper.rb +1 -0
- data/vendored/puppet/lib/puppet/module_tool/tar.rb +18 -0
- data/vendored/puppet/lib/puppet/module_tool/tar/gnu.rb +19 -0
- data/vendored/puppet/lib/puppet/module_tool/tar/mini.rb +106 -0
- data/vendored/puppet/lib/puppet/network.rb +3 -0
- data/vendored/puppet/lib/puppet/network/auth_config_parser.rb +90 -0
- data/vendored/puppet/lib/puppet/network/authconfig.rb +112 -0
- data/vendored/puppet/lib/puppet/network/authorization.rb +41 -0
- data/vendored/puppet/lib/puppet/network/authstore.rb +282 -0
- data/vendored/puppet/lib/puppet/network/client_request.rb +29 -0
- data/vendored/puppet/lib/puppet/network/format.rb +110 -0
- data/vendored/puppet/lib/puppet/network/format_handler.rb +108 -0
- data/vendored/puppet/lib/puppet/network/format_support.rb +134 -0
- data/vendored/puppet/lib/puppet/network/formats.rb +171 -0
- data/vendored/puppet/lib/puppet/network/http.rb +30 -0
- data/vendored/puppet/lib/puppet/network/http/api.rb +44 -0
- data/vendored/puppet/lib/puppet/network/http/api/ca.rb +2 -0
- data/vendored/puppet/lib/puppet/network/http/api/ca/v1.rb +11 -0
- data/vendored/puppet/lib/puppet/network/http/api/indirected_routes.rb +279 -0
- data/vendored/puppet/lib/puppet/network/http/api/indirection_type.rb +32 -0
- data/vendored/puppet/lib/puppet/network/http/api/master.rb +2 -0
- data/vendored/puppet/lib/puppet/network/http/api/master/v3.rb +28 -0
- data/vendored/puppet/lib/puppet/network/http/api/master/v3/authorization.rb +18 -0
- data/vendored/puppet/lib/puppet/network/http/api/master/v3/environment.rb +85 -0
- data/vendored/puppet/lib/puppet/network/http/api/master/v3/environments.rb +35 -0
- data/vendored/puppet/lib/puppet/network/http/compression.rb +120 -0
- data/vendored/puppet/lib/puppet/network/http/connection.rb +332 -0
- data/vendored/puppet/lib/puppet/network/http/error.rb +73 -0
- data/vendored/puppet/lib/puppet/network/http/factory.rb +56 -0
- data/vendored/puppet/lib/puppet/network/http/handler.rb +183 -0
- data/vendored/puppet/lib/puppet/network/http/issues.rb +12 -0
- data/vendored/puppet/lib/puppet/network/http/memory_response.rb +13 -0
- data/vendored/puppet/lib/puppet/network/http/nocache_pool.rb +21 -0
- data/vendored/puppet/lib/puppet/network/http/pool.rb +129 -0
- data/vendored/puppet/lib/puppet/network/http/rack.rb +33 -0
- data/vendored/puppet/lib/puppet/network/http/rack/rest.rb +162 -0
- data/vendored/puppet/lib/puppet/network/http/request.rb +70 -0
- data/vendored/puppet/lib/puppet/network/http/response.rb +23 -0
- data/vendored/puppet/lib/puppet/network/http/route.rb +100 -0
- data/vendored/puppet/lib/puppet/network/http/session.rb +17 -0
- data/vendored/puppet/lib/puppet/network/http/site.rb +39 -0
- data/vendored/puppet/lib/puppet/network/http/webrick.rb +124 -0
- data/vendored/puppet/lib/puppet/network/http/webrick/rest.rb +114 -0
- data/vendored/puppet/lib/puppet/network/http_pool.rb +61 -0
- data/vendored/puppet/lib/puppet/network/resolver.rb +85 -0
- data/vendored/puppet/lib/puppet/network/rest_controller.rb +2 -0
- data/vendored/puppet/lib/puppet/network/rights.rb +209 -0
- data/vendored/puppet/lib/puppet/network/server.rb +39 -0
- data/vendored/puppet/lib/puppet/node.rb +282 -0
- data/vendored/puppet/lib/puppet/node/environment.rb +586 -0
- data/vendored/puppet/lib/puppet/node/facts.rb +137 -0
- data/vendored/puppet/lib/puppet/parameter.rb +567 -0
- data/vendored/puppet/lib/puppet/parameter/boolean.rb +15 -0
- data/vendored/puppet/lib/puppet/parameter/package_options.rb +31 -0
- data/vendored/puppet/lib/puppet/parameter/path.rb +57 -0
- data/vendored/puppet/lib/puppet/parameter/value.rb +91 -0
- data/vendored/puppet/lib/puppet/parameter/value_collection.rb +212 -0
- data/vendored/puppet/lib/puppet/parser.rb +20 -0
- data/vendored/puppet/lib/puppet/parser/abstract_compiler.rb +36 -0
- data/vendored/puppet/lib/puppet/parser/ast.rb +65 -0
- data/vendored/puppet/lib/puppet/parser/ast/block_expression.rb +15 -0
- data/vendored/puppet/lib/puppet/parser/ast/branch.rb +19 -0
- data/vendored/puppet/lib/puppet/parser/ast/hostclass.rb +27 -0
- data/vendored/puppet/lib/puppet/parser/ast/leaf.rb +75 -0
- data/vendored/puppet/lib/puppet/parser/ast/node.rb +17 -0
- data/vendored/puppet/lib/puppet/parser/ast/pops_bridge.rb +273 -0
- data/vendored/puppet/lib/puppet/parser/ast/resource.rb +66 -0
- data/vendored/puppet/lib/puppet/parser/ast/resource_instance.rb +10 -0
- data/vendored/puppet/lib/puppet/parser/ast/resourceparam.rb +31 -0
- data/vendored/puppet/lib/puppet/parser/ast/top_level_construct.rb +4 -0
- data/vendored/puppet/lib/puppet/parser/compiler.rb +797 -0
- data/vendored/puppet/lib/puppet/parser/compiler/catalog_validator.rb +33 -0
- data/vendored/puppet/lib/puppet/parser/compiler/catalog_validator/env_relationship_validator.rb +64 -0
- data/vendored/puppet/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +57 -0
- data/vendored/puppet/lib/puppet/parser/compiler/catalog_validator/site_validator.rb +20 -0
- data/vendored/puppet/lib/puppet/parser/e4_parser_adapter.rb +60 -0
- data/vendored/puppet/lib/puppet/parser/environment_compiler.rb +199 -0
- data/vendored/puppet/lib/puppet/parser/files.rb +92 -0
- data/vendored/puppet/lib/puppet/parser/functions.rb +277 -0
- data/vendored/puppet/lib/puppet/parser/functions/assert_type.rb +60 -0
- data/vendored/puppet/lib/puppet/parser/functions/binary_file.rb +24 -0
- data/vendored/puppet/lib/puppet/parser/functions/break.rb +39 -0
- data/vendored/puppet/lib/puppet/parser/functions/contain.rb +30 -0
- data/vendored/puppet/lib/puppet/parser/functions/create_resources.rb +112 -0
- data/vendored/puppet/lib/puppet/parser/functions/defined.rb +107 -0
- data/vendored/puppet/lib/puppet/parser/functions/dig.rb +38 -0
- data/vendored/puppet/lib/puppet/parser/functions/digest.rb +5 -0
- data/vendored/puppet/lib/puppet/parser/functions/each.rb +104 -0
- data/vendored/puppet/lib/puppet/parser/functions/epp.rb +39 -0
- data/vendored/puppet/lib/puppet/parser/functions/fail.rb +4 -0
- data/vendored/puppet/lib/puppet/parser/functions/file.rb +33 -0
- data/vendored/puppet/lib/puppet/parser/functions/filter.rb +78 -0
- data/vendored/puppet/lib/puppet/parser/functions/find_file.rb +28 -0
- data/vendored/puppet/lib/puppet/parser/functions/fqdn_rand.rb +36 -0
- data/vendored/puppet/lib/puppet/parser/functions/generate.rb +36 -0
- data/vendored/puppet/lib/puppet/parser/functions/hiera.rb +103 -0
- data/vendored/puppet/lib/puppet/parser/functions/hiera_array.rb +92 -0
- data/vendored/puppet/lib/puppet/parser/functions/hiera_hash.rb +102 -0
- data/vendored/puppet/lib/puppet/parser/functions/hiera_include.rb +102 -0
- data/vendored/puppet/lib/puppet/parser/functions/include.rb +34 -0
- data/vendored/puppet/lib/puppet/parser/functions/inline_epp.rb +51 -0
- data/vendored/puppet/lib/puppet/parser/functions/inline_template.rb +26 -0
- data/vendored/puppet/lib/puppet/parser/functions/lest.rb +49 -0
- data/vendored/puppet/lib/puppet/parser/functions/lookup.rb +132 -0
- data/vendored/puppet/lib/puppet/parser/functions/map.rb +76 -0
- data/vendored/puppet/lib/puppet/parser/functions/match.rb +43 -0
- data/vendored/puppet/lib/puppet/parser/functions/md5.rb +5 -0
- data/vendored/puppet/lib/puppet/parser/functions/new.rb +991 -0
- data/vendored/puppet/lib/puppet/parser/functions/next.rb +38 -0
- data/vendored/puppet/lib/puppet/parser/functions/realize.rb +20 -0
- data/vendored/puppet/lib/puppet/parser/functions/reduce.rb +137 -0
- data/vendored/puppet/lib/puppet/parser/functions/regsubst.rb +62 -0
- data/vendored/puppet/lib/puppet/parser/functions/require.rb +40 -0
- data/vendored/puppet/lib/puppet/parser/functions/return.rb +71 -0
- data/vendored/puppet/lib/puppet/parser/functions/reverse_each.rb +83 -0
- data/vendored/puppet/lib/puppet/parser/functions/scanf.rb +38 -0
- data/vendored/puppet/lib/puppet/parser/functions/sha1.rb +5 -0
- data/vendored/puppet/lib/puppet/parser/functions/sha256.rb +5 -0
- data/vendored/puppet/lib/puppet/parser/functions/shellquote.rb +61 -0
- data/vendored/puppet/lib/puppet/parser/functions/slice.rb +39 -0
- data/vendored/puppet/lib/puppet/parser/functions/split.rb +28 -0
- data/vendored/puppet/lib/puppet/parser/functions/sprintf.rb +50 -0
- data/vendored/puppet/lib/puppet/parser/functions/step.rb +84 -0
- data/vendored/puppet/lib/puppet/parser/functions/strftime.rb +185 -0
- data/vendored/puppet/lib/puppet/parser/functions/tag.rb +12 -0
- data/vendored/puppet/lib/puppet/parser/functions/tagged.rb +24 -0
- data/vendored/puppet/lib/puppet/parser/functions/template.rb +39 -0
- data/vendored/puppet/lib/puppet/parser/functions/then.rb +73 -0
- data/vendored/puppet/lib/puppet/parser/functions/type.rb +53 -0
- data/vendored/puppet/lib/puppet/parser/functions/versioncmp.rb +30 -0
- data/vendored/puppet/lib/puppet/parser/functions/with.rb +28 -0
- data/vendored/puppet/lib/puppet/parser/parser_factory.rb +30 -0
- data/vendored/puppet/lib/puppet/parser/relationship.rb +83 -0
- data/vendored/puppet/lib/puppet/parser/resource.rb +417 -0
- data/vendored/puppet/lib/puppet/parser/resource/param.rb +22 -0
- data/vendored/puppet/lib/puppet/parser/scope.rb +1125 -0
- data/vendored/puppet/lib/puppet/parser/script_compiler.rb +118 -0
- data/vendored/puppet/lib/puppet/parser/templatewrapper.rb +102 -0
- data/vendored/puppet/lib/puppet/parser/type_loader.rb +149 -0
- data/vendored/puppet/lib/puppet/plugins.rb +9 -0
- data/vendored/puppet/lib/puppet/plugins/configuration.rb +25 -0
- data/vendored/puppet/lib/puppet/plugins/syntax_checkers.rb +98 -0
- data/vendored/puppet/lib/puppet/pops.rb +120 -0
- data/vendored/puppet/lib/puppet/pops/adaptable.rb +206 -0
- data/vendored/puppet/lib/puppet/pops/adapters.rb +138 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/access_operator.rb +719 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/callable_signature.rb +107 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/closure.rb +373 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/collector_transformer.rb +234 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +86 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +29 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/collectors/exported_collector.rb +69 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb +37 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/compare_operator.rb +252 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/epp_evaluator.rb +120 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb +1284 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/external_syntax_support.rb +45 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +82 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/literal_evaluator.rb +87 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/puppet_proc.rb +69 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/relationship_operator.rb +185 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_converter.rb +202 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_resource_support.rb +117 -0
- data/vendored/puppet/lib/puppet/pops/evaluator/runtime3_support.rb +540 -0
- data/vendored/puppet/lib/puppet/pops/functions/dispatch.rb +101 -0
- data/vendored/puppet/lib/puppet/pops/functions/dispatcher.rb +71 -0
- data/vendored/puppet/lib/puppet/pops/functions/function.rb +141 -0
- data/vendored/puppet/lib/puppet/pops/issue_reporter.rb +137 -0
- data/vendored/puppet/lib/puppet/pops/issues.rb +901 -0
- data/vendored/puppet/lib/puppet/pops/label_provider.rb +90 -0
- data/vendored/puppet/lib/puppet/pops/loader/base_loader.rb +166 -0
- data/vendored/puppet/lib/puppet/pops/loader/dependency_loader.rb +92 -0
- data/vendored/puppet/lib/puppet/pops/loader/gem_support.rb +49 -0
- data/vendored/puppet/lib/puppet/pops/loader/loader.rb +209 -0
- data/vendored/puppet/lib/puppet/pops/loader/loader_paths.rb +375 -0
- data/vendored/puppet/lib/puppet/pops/loader/module_loaders.rb +523 -0
- data/vendored/puppet/lib/puppet/pops/loader/null_loader.rb +60 -0
- data/vendored/puppet/lib/puppet/pops/loader/predefined_loader.rb +24 -0
- data/vendored/puppet/lib/puppet/pops/loader/puppet_function_instantiator.rb +84 -0
- data/vendored/puppet/lib/puppet/pops/loader/puppet_plan_instantiator.rb +84 -0
- data/vendored/puppet/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +79 -0
- data/vendored/puppet/lib/puppet/pops/loader/ruby_data_type_instantiator.rb +39 -0
- data/vendored/puppet/lib/puppet/pops/loader/ruby_function_instantiator.rb +45 -0
- data/vendored/puppet/lib/puppet/pops/loader/runtime3_type_loader.rb +101 -0
- data/vendored/puppet/lib/puppet/pops/loader/simple_environment_loader.rb +20 -0
- data/vendored/puppet/lib/puppet/pops/loader/static_loader.rb +163 -0
- data/vendored/puppet/lib/puppet/pops/loader/task_instantiator.rb +69 -0
- data/vendored/puppet/lib/puppet/pops/loader/type_definition_instantiator.rb +100 -0
- data/vendored/puppet/lib/puppet/pops/loader/typed_name.rb +54 -0
- data/vendored/puppet/lib/puppet/pops/loader/uri_helper.rb +22 -0
- data/vendored/puppet/lib/puppet/pops/loaders.rb +545 -0
- data/vendored/puppet/lib/puppet/pops/lookup.rb +96 -0
- data/vendored/puppet/lib/puppet/pops/lookup/configured_data_provider.rb +93 -0
- data/vendored/puppet/lib/puppet/pops/lookup/context.rb +200 -0
- data/vendored/puppet/lib/puppet/pops/lookup/data_adapter.rb +27 -0
- data/vendored/puppet/lib/puppet/pops/lookup/data_dig_function_provider.rb +145 -0
- data/vendored/puppet/lib/puppet/pops/lookup/data_hash_function_provider.rb +126 -0
- data/vendored/puppet/lib/puppet/pops/lookup/data_provider.rb +92 -0
- data/vendored/puppet/lib/puppet/pops/lookup/environment_data_provider.rb +35 -0
- data/vendored/puppet/lib/puppet/pops/lookup/explainer.rb +595 -0
- data/vendored/puppet/lib/puppet/pops/lookup/function_provider.rb +110 -0
- data/vendored/puppet/lib/puppet/pops/lookup/global_data_provider.rb +75 -0
- data/vendored/puppet/lib/puppet/pops/lookup/hiera_config.rb +761 -0
- data/vendored/puppet/lib/puppet/pops/lookup/interpolation.rb +154 -0
- data/vendored/puppet/lib/puppet/pops/lookup/invocation.rb +261 -0
- data/vendored/puppet/lib/puppet/pops/lookup/location_resolver.rb +99 -0
- data/vendored/puppet/lib/puppet/pops/lookup/lookup_adapter.rb +471 -0
- data/vendored/puppet/lib/puppet/pops/lookup/lookup_key.rb +99 -0
- data/vendored/puppet/lib/puppet/pops/lookup/lookup_key_function_provider.rb +92 -0
- data/vendored/puppet/lib/puppet/pops/lookup/module_data_provider.rb +89 -0
- data/vendored/puppet/lib/puppet/pops/lookup/sub_lookup.rb +92 -0
- data/vendored/puppet/lib/puppet/pops/merge_strategy.rb +437 -0
- data/vendored/puppet/lib/puppet/pops/migration/migration_checker.rb +58 -0
- data/vendored/puppet/lib/puppet/pops/model/ast.rb +4870 -0
- data/vendored/puppet/lib/puppet/pops/model/ast_transformer.rb +131 -0
- data/vendored/puppet/lib/puppet/pops/model/factory.rb +1150 -0
- data/vendored/puppet/lib/puppet/pops/model/model_label_provider.rb +132 -0
- data/vendored/puppet/lib/puppet/pops/model/model_tree_dumper.rb +467 -0
- data/vendored/puppet/lib/puppet/pops/model/pn_transformer.rb +400 -0
- data/vendored/puppet/lib/puppet/pops/model/tree_dumper.rb +59 -0
- data/vendored/puppet/lib/puppet/pops/parser/code_merger.rb +29 -0
- data/vendored/puppet/lib/puppet/pops/parser/eparser.rb +3315 -0
- data/vendored/puppet/lib/puppet/pops/parser/epp_parser.rb +51 -0
- data/vendored/puppet/lib/puppet/pops/parser/epp_support.rb +260 -0
- data/vendored/puppet/lib/puppet/pops/parser/evaluating_parser.rb +165 -0
- data/vendored/puppet/lib/puppet/pops/parser/heredoc_support.rb +143 -0
- data/vendored/puppet/lib/puppet/pops/parser/interpolation_support.rb +244 -0
- data/vendored/puppet/lib/puppet/pops/parser/lexer2.rb +772 -0
- data/vendored/puppet/lib/puppet/pops/parser/lexer_support.rb +221 -0
- data/vendored/puppet/lib/puppet/pops/parser/locatable.rb +23 -0
- data/vendored/puppet/lib/puppet/pops/parser/locator.rb +336 -0
- data/vendored/puppet/lib/puppet/pops/parser/parser_support.rb +247 -0
- data/vendored/puppet/lib/puppet/pops/parser/pn_parser.rb +316 -0
- data/vendored/puppet/lib/puppet/pops/parser/slurp_support.rb +117 -0
- data/vendored/puppet/lib/puppet/pops/patterns.rb +60 -0
- data/vendored/puppet/lib/puppet/pops/pcore.rb +147 -0
- data/vendored/puppet/lib/puppet/pops/pn.rb +236 -0
- data/vendored/puppet/lib/puppet/pops/puppet_stack.rb +43 -0
- data/vendored/puppet/lib/puppet/pops/resource/param.rb +55 -0
- data/vendored/puppet/lib/puppet/pops/resource/resource_type_impl.rb +314 -0
- data/vendored/puppet/lib/puppet/pops/semantic_error.rb +29 -0
- data/vendored/puppet/lib/puppet/pops/serialization.rb +41 -0
- data/vendored/puppet/lib/puppet/pops/serialization/abstract_reader.rb +180 -0
- data/vendored/puppet/lib/puppet/pops/serialization/abstract_writer.rb +222 -0
- data/vendored/puppet/lib/puppet/pops/serialization/deserializer.rb +80 -0
- data/vendored/puppet/lib/puppet/pops/serialization/extension.rb +158 -0
- data/vendored/puppet/lib/puppet/pops/serialization/from_data_converter.rb +223 -0
- data/vendored/puppet/lib/puppet/pops/serialization/instance_reader.rb +19 -0
- data/vendored/puppet/lib/puppet/pops/serialization/instance_writer.rb +14 -0
- data/vendored/puppet/lib/puppet/pops/serialization/json.rb +297 -0
- data/vendored/puppet/lib/puppet/pops/serialization/json_path.rb +127 -0
- data/vendored/puppet/lib/puppet/pops/serialization/object.rb +70 -0
- data/vendored/puppet/lib/puppet/pops/serialization/serializer.rb +140 -0
- data/vendored/puppet/lib/puppet/pops/serialization/time_factory.rb +67 -0
- data/vendored/puppet/lib/puppet/pops/serialization/to_data_converter.rb +305 -0
- data/vendored/puppet/lib/puppet/pops/time/timespan.rb +718 -0
- data/vendored/puppet/lib/puppet/pops/time/timestamp.rb +160 -0
- data/vendored/puppet/lib/puppet/pops/types/annotatable.rb +36 -0
- data/vendored/puppet/lib/puppet/pops/types/annotation.rb +71 -0
- data/vendored/puppet/lib/puppet/pops/types/class_loader.rb +132 -0
- data/vendored/puppet/lib/puppet/pops/types/enumeration.rb +16 -0
- data/vendored/puppet/lib/puppet/pops/types/implementation_registry.rb +134 -0
- data/vendored/puppet/lib/puppet/pops/types/iterable.rb +339 -0
- data/vendored/puppet/lib/puppet/pops/types/p_binary_type.rb +233 -0
- data/vendored/puppet/lib/puppet/pops/types/p_init_type.rb +238 -0
- data/vendored/puppet/lib/puppet/pops/types/p_meta_type.rb +94 -0
- data/vendored/puppet/lib/puppet/pops/types/p_object_type.rb +1114 -0
- data/vendored/puppet/lib/puppet/pops/types/p_object_type_extension.rb +218 -0
- data/vendored/puppet/lib/puppet/pops/types/p_runtime_type.rb +115 -0
- data/vendored/puppet/lib/puppet/pops/types/p_sem_ver_range_type.rb +190 -0
- data/vendored/puppet/lib/puppet/pops/types/p_sem_ver_type.rb +149 -0
- data/vendored/puppet/lib/puppet/pops/types/p_sensitive_type.rb +73 -0
- data/vendored/puppet/lib/puppet/pops/types/p_timespan_type.rb +192 -0
- data/vendored/puppet/lib/puppet/pops/types/p_timestamp_type.rb +73 -0
- data/vendored/puppet/lib/puppet/pops/types/p_type_set_type.rb +383 -0
- data/vendored/puppet/lib/puppet/pops/types/p_uri_type.rb +190 -0
- data/vendored/puppet/lib/puppet/pops/types/puppet_object.rb +40 -0
- data/vendored/puppet/lib/puppet/pops/types/recursion_guard.rb +136 -0
- data/vendored/puppet/lib/puppet/pops/types/ruby_generator.rb +472 -0
- data/vendored/puppet/lib/puppet/pops/types/ruby_method.rb +31 -0
- data/vendored/puppet/lib/puppet/pops/types/string_converter.rb +1123 -0
- data/vendored/puppet/lib/puppet/pops/types/tree_iterators.rb +254 -0
- data/vendored/puppet/lib/puppet/pops/types/type_acceptor.rb +25 -0
- data/vendored/puppet/lib/puppet/pops/types/type_asserter.rb +47 -0
- data/vendored/puppet/lib/puppet/pops/types/type_assertion_error.rb +27 -0
- data/vendored/puppet/lib/puppet/pops/types/type_calculator.rb +809 -0
- data/vendored/puppet/lib/puppet/pops/types/type_conversion_error.rb +15 -0
- data/vendored/puppet/lib/puppet/pops/types/type_factory.rb +614 -0
- data/vendored/puppet/lib/puppet/pops/types/type_formatter.rb +802 -0
- data/vendored/puppet/lib/puppet/pops/types/type_mismatch_describer.rb +1075 -0
- data/vendored/puppet/lib/puppet/pops/types/type_parser.rb +685 -0
- data/vendored/puppet/lib/puppet/pops/types/type_set_reference.rb +59 -0
- data/vendored/puppet/lib/puppet/pops/types/type_with_members.rb +43 -0
- data/vendored/puppet/lib/puppet/pops/types/types.rb +3650 -0
- data/vendored/puppet/lib/puppet/pops/utils.rb +119 -0
- data/vendored/puppet/lib/puppet/pops/validation.rb +466 -0
- data/vendored/puppet/lib/puppet/pops/validation/checker4_0.rb +998 -0
- data/vendored/puppet/lib/puppet/pops/validation/tasks_checker.rb +60 -0
- data/vendored/puppet/lib/puppet/pops/validation/validator_factory_4_0.rb +43 -0
- data/vendored/puppet/lib/puppet/pops/visitable.rb +6 -0
- data/vendored/puppet/lib/puppet/pops/visitor.rb +116 -0
- data/vendored/puppet/lib/puppet/property.rb +608 -0
- data/vendored/puppet/lib/puppet/property/boolean.rb +7 -0
- data/vendored/puppet/lib/puppet/property/ensure.rb +105 -0
- data/vendored/puppet/lib/puppet/property/keyvalue.rb +95 -0
- data/vendored/puppet/lib/puppet/property/list.rb +69 -0
- data/vendored/puppet/lib/puppet/property/ordered_list.rb +29 -0
- data/vendored/puppet/lib/puppet/provider.rb +613 -0
- data/vendored/puppet/lib/puppet/provider/aixobject.rb +392 -0
- data/vendored/puppet/lib/puppet/provider/augeas/augeas.rb +566 -0
- data/vendored/puppet/lib/puppet/provider/cisco.rb +9 -0
- data/vendored/puppet/lib/puppet/provider/command.rb +25 -0
- data/vendored/puppet/lib/puppet/provider/computer/computer.rb +20 -0
- data/vendored/puppet/lib/puppet/provider/confine.rb +6 -0
- data/vendored/puppet/lib/puppet/provider/cron/crontab.rb +297 -0
- data/vendored/puppet/lib/puppet/provider/exec.rb +96 -0
- data/vendored/puppet/lib/puppet/provider/exec/posix.rb +48 -0
- data/vendored/puppet/lib/puppet/provider/exec/shell.rb +25 -0
- data/vendored/puppet/lib/puppet/provider/exec/windows.rb +55 -0
- data/vendored/puppet/lib/puppet/provider/file/posix.rb +136 -0
- data/vendored/puppet/lib/puppet/provider/file/windows.rb +104 -0
- data/vendored/puppet/lib/puppet/provider/group/aix.rb +143 -0
- data/vendored/puppet/lib/puppet/provider/group/directoryservice.rb +22 -0
- data/vendored/puppet/lib/puppet/provider/group/groupadd.rb +111 -0
- data/vendored/puppet/lib/puppet/provider/group/ldap.rb +45 -0
- data/vendored/puppet/lib/puppet/provider/group/pw.rb +49 -0
- data/vendored/puppet/lib/puppet/provider/group/windows_adsi.rb +106 -0
- data/vendored/puppet/lib/puppet/provider/host/parsed.rb +46 -0
- data/vendored/puppet/lib/puppet/provider/interface/cisco.rb +27 -0
- data/vendored/puppet/lib/puppet/provider/ldap.rb +137 -0
- data/vendored/puppet/lib/puppet/provider/macauthorization/macauthorization.rb +298 -0
- data/vendored/puppet/lib/puppet/provider/mailalias/aliases.rb +50 -0
- data/vendored/puppet/lib/puppet/provider/maillist/mailman.rb +108 -0
- data/vendored/puppet/lib/puppet/provider/mcx/mcxcontent.rb +173 -0
- data/vendored/puppet/lib/puppet/provider/mount.rb +76 -0
- data/vendored/puppet/lib/puppet/provider/mount/parsed.rb +282 -0
- data/vendored/puppet/lib/puppet/provider/naginator.rb +63 -0
- data/vendored/puppet/lib/puppet/provider/nameservice.rb +325 -0
- data/vendored/puppet/lib/puppet/provider/nameservice/directoryservice.rb +508 -0
- data/vendored/puppet/lib/puppet/provider/nameservice/objectadd.rb +22 -0
- data/vendored/puppet/lib/puppet/provider/nameservice/pw.rb +21 -0
- data/vendored/puppet/lib/puppet/provider/network_device.rb +72 -0
- data/vendored/puppet/lib/puppet/provider/package.rb +56 -0
- data/vendored/puppet/lib/puppet/provider/package/aix.rb +152 -0
- data/vendored/puppet/lib/puppet/provider/package/appdmg.rb +109 -0
- data/vendored/puppet/lib/puppet/provider/package/apple.rb +46 -0
- data/vendored/puppet/lib/puppet/provider/package/apt.rb +116 -0
- data/vendored/puppet/lib/puppet/provider/package/aptitude.rb +29 -0
- data/vendored/puppet/lib/puppet/provider/package/aptrpm.rb +83 -0
- data/vendored/puppet/lib/puppet/provider/package/blastwave.rb +111 -0
- data/vendored/puppet/lib/puppet/provider/package/dnf.rb +46 -0
- data/vendored/puppet/lib/puppet/provider/package/dpkg.rb +165 -0
- data/vendored/puppet/lib/puppet/provider/package/fink.rb +79 -0
- data/vendored/puppet/lib/puppet/provider/package/freebsd.rb +47 -0
- data/vendored/puppet/lib/puppet/provider/package/gem.rb +175 -0
- data/vendored/puppet/lib/puppet/provider/package/hpux.rb +44 -0
- data/vendored/puppet/lib/puppet/provider/package/macports.rb +107 -0
- data/vendored/puppet/lib/puppet/provider/package/nim.rb +282 -0
- data/vendored/puppet/lib/puppet/provider/package/openbsd.rb +242 -0
- data/vendored/puppet/lib/puppet/provider/package/opkg.rb +81 -0
- data/vendored/puppet/lib/puppet/provider/package/pacman.rb +267 -0
- data/vendored/puppet/lib/puppet/provider/package/pip.rb +188 -0
- data/vendored/puppet/lib/puppet/provider/package/pip3.rb +20 -0
- data/vendored/puppet/lib/puppet/provider/package/pkg.rb +255 -0
- data/vendored/puppet/lib/puppet/provider/package/pkgdmg.rb +151 -0
- data/vendored/puppet/lib/puppet/provider/package/pkgin.rb +87 -0
- data/vendored/puppet/lib/puppet/provider/package/pkgng.rb +143 -0
- data/vendored/puppet/lib/puppet/provider/package/pkgutil.rb +186 -0
- data/vendored/puppet/lib/puppet/provider/package/portage.rb +300 -0
- data/vendored/puppet/lib/puppet/provider/package/ports.rb +91 -0
- data/vendored/puppet/lib/puppet/provider/package/portupgrade.rb +239 -0
- data/vendored/puppet/lib/puppet/provider/package/puppet_gem.rb +17 -0
- data/vendored/puppet/lib/puppet/provider/package/rpm.rb +405 -0
- data/vendored/puppet/lib/puppet/provider/package/rug.rb +51 -0
- data/vendored/puppet/lib/puppet/provider/package/sun.rb +133 -0
- data/vendored/puppet/lib/puppet/provider/package/sunfreeware.rb +9 -0
- data/vendored/puppet/lib/puppet/provider/package/tdnf.rb +28 -0
- data/vendored/puppet/lib/puppet/provider/package/up2date.rb +40 -0
- data/vendored/puppet/lib/puppet/provider/package/urpmi.rb +55 -0
- data/vendored/puppet/lib/puppet/provider/package/windows.rb +113 -0
- data/vendored/puppet/lib/puppet/provider/package/windows/exe_package.rb +71 -0
- data/vendored/puppet/lib/puppet/provider/package/windows/msi_package.rb +62 -0
- data/vendored/puppet/lib/puppet/provider/package/windows/package.rb +100 -0
- data/vendored/puppet/lib/puppet/provider/package/yum.rb +293 -0
- data/vendored/puppet/lib/puppet/provider/package/zypper.rb +145 -0
- data/vendored/puppet/lib/puppet/provider/parsedfile.rb +459 -0
- data/vendored/puppet/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +590 -0
- data/vendored/puppet/lib/puppet/provider/selboolean/getsetsebool.rb +47 -0
- data/vendored/puppet/lib/puppet/provider/selmodule/semodule.rb +140 -0
- data/vendored/puppet/lib/puppet/provider/service/base.rb +134 -0
- data/vendored/puppet/lib/puppet/provider/service/bsd.rb +51 -0
- data/vendored/puppet/lib/puppet/provider/service/daemontools.rb +194 -0
- data/vendored/puppet/lib/puppet/provider/service/debian.rb +74 -0
- data/vendored/puppet/lib/puppet/provider/service/freebsd.rb +143 -0
- data/vendored/puppet/lib/puppet/provider/service/gentoo.rb +45 -0
- data/vendored/puppet/lib/puppet/provider/service/init.rb +194 -0
- data/vendored/puppet/lib/puppet/provider/service/launchd.rb +345 -0
- data/vendored/puppet/lib/puppet/provider/service/openbsd.rb +100 -0
- data/vendored/puppet/lib/puppet/provider/service/openrc.rb +71 -0
- data/vendored/puppet/lib/puppet/provider/service/openwrt.rb +36 -0
- data/vendored/puppet/lib/puppet/provider/service/rcng.rb +51 -0
- data/vendored/puppet/lib/puppet/provider/service/redhat.rb +72 -0
- data/vendored/puppet/lib/puppet/provider/service/runit.rb +112 -0
- data/vendored/puppet/lib/puppet/provider/service/service.rb +42 -0
- data/vendored/puppet/lib/puppet/provider/service/smf.rb +170 -0
- data/vendored/puppet/lib/puppet/provider/service/src.rb +147 -0
- data/vendored/puppet/lib/puppet/provider/service/systemd.rb +187 -0
- data/vendored/puppet/lib/puppet/provider/service/upstart.rb +359 -0
- data/vendored/puppet/lib/puppet/provider/service/windows.rb +106 -0
- data/vendored/puppet/lib/puppet/provider/ssh_authorized_key/parsed.rb +105 -0
- data/vendored/puppet/lib/puppet/provider/sshkey/parsed.rb +50 -0
- data/vendored/puppet/lib/puppet/provider/user/aix.rb +383 -0
- data/vendored/puppet/lib/puppet/provider/user/directoryservice.rb +632 -0
- data/vendored/puppet/lib/puppet/provider/user/hpux.rb +95 -0
- data/vendored/puppet/lib/puppet/provider/user/ldap.rb +128 -0
- data/vendored/puppet/lib/puppet/provider/user/openbsd.rb +76 -0
- data/vendored/puppet/lib/puppet/provider/user/pw.rb +98 -0
- data/vendored/puppet/lib/puppet/provider/user/user_role_add.rb +233 -0
- data/vendored/puppet/lib/puppet/provider/user/useradd.rb +265 -0
- data/vendored/puppet/lib/puppet/provider/user/windows_adsi.rb +148 -0
- data/vendored/puppet/lib/puppet/provider/vlan/cisco.rb +28 -0
- data/vendored/puppet/lib/puppet/provider/yumrepo/inifile.rb +303 -0
- data/vendored/puppet/lib/puppet/provider/zfs/zfs.rb +108 -0
- data/vendored/puppet/lib/puppet/provider/zone/solaris.rb +364 -0
- data/vendored/puppet/lib/puppet/provider/zpool/zpool.rb +125 -0
- data/vendored/puppet/lib/puppet/reference/configuration.rb +86 -0
- data/vendored/puppet/lib/puppet/reference/function.rb +17 -0
- data/vendored/puppet/lib/puppet/reference/indirection.rb +71 -0
- data/vendored/puppet/lib/puppet/reference/metaparameter.rb +35 -0
- data/vendored/puppet/lib/puppet/reference/providers.rb +118 -0
- data/vendored/puppet/lib/puppet/reference/report.rb +20 -0
- data/vendored/puppet/lib/puppet/reference/type.rb +113 -0
- data/vendored/puppet/lib/puppet/relationship.rb +89 -0
- data/vendored/puppet/lib/puppet/reports.rb +93 -0
- data/vendored/puppet/lib/puppet/reports/http.rb +37 -0
- data/vendored/puppet/lib/puppet/reports/log.rb +14 -0
- data/vendored/puppet/lib/puppet/reports/store.rb +68 -0
- data/vendored/puppet/lib/puppet/resource.rb +670 -0
- data/vendored/puppet/lib/puppet/resource/capability_finder.rb +150 -0
- data/vendored/puppet/lib/puppet/resource/catalog.rb +682 -0
- data/vendored/puppet/lib/puppet/resource/status.rb +227 -0
- data/vendored/puppet/lib/puppet/resource/type.rb +524 -0
- data/vendored/puppet/lib/puppet/resource/type_collection.rb +263 -0
- data/vendored/puppet/lib/puppet/scheduler.rb +16 -0
- data/vendored/puppet/lib/puppet/scheduler/job.rb +53 -0
- data/vendored/puppet/lib/puppet/scheduler/scheduler.rb +44 -0
- data/vendored/puppet/lib/puppet/scheduler/splay_job.rb +32 -0
- data/vendored/puppet/lib/puppet/scheduler/timer.rb +13 -0
- data/vendored/puppet/lib/puppet/settings.rb +1475 -0
- data/vendored/puppet/lib/puppet/settings/array_setting.rb +17 -0
- data/vendored/puppet/lib/puppet/settings/autosign_setting.rb +22 -0
- data/vendored/puppet/lib/puppet/settings/base_setting.rb +197 -0
- data/vendored/puppet/lib/puppet/settings/boolean_setting.rb +32 -0
- data/vendored/puppet/lib/puppet/settings/certificate_revocation_setting.rb +21 -0
- data/vendored/puppet/lib/puppet/settings/config_file.rb +153 -0
- data/vendored/puppet/lib/puppet/settings/directory_setting.rb +18 -0
- data/vendored/puppet/lib/puppet/settings/duration_setting.rb +32 -0
- data/vendored/puppet/lib/puppet/settings/enum_setting.rb +16 -0
- data/vendored/puppet/lib/puppet/settings/environment_conf.rb +213 -0
- data/vendored/puppet/lib/puppet/settings/errors.rb +11 -0
- data/vendored/puppet/lib/puppet/settings/file_or_directory_setting.rb +40 -0
- data/vendored/puppet/lib/puppet/settings/file_setting.rb +245 -0
- data/vendored/puppet/lib/puppet/settings/ini_file.rb +225 -0
- data/vendored/puppet/lib/puppet/settings/path_setting.rb +8 -0
- data/vendored/puppet/lib/puppet/settings/priority_setting.rb +42 -0
- data/vendored/puppet/lib/puppet/settings/server_list_setting.rb +20 -0
- data/vendored/puppet/lib/puppet/settings/string_setting.rb +9 -0
- data/vendored/puppet/lib/puppet/settings/symbolic_enum_setting.rb +17 -0
- data/vendored/puppet/lib/puppet/settings/terminus_setting.rb +14 -0
- data/vendored/puppet/lib/puppet/settings/ttl_setting.rb +51 -0
- data/vendored/puppet/lib/puppet/settings/value_translator.rb +15 -0
- data/vendored/puppet/lib/puppet/ssl.rb +13 -0
- data/vendored/puppet/lib/puppet/ssl/base.rb +158 -0
- data/vendored/puppet/lib/puppet/ssl/certificate.rb +95 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_authority.rb +553 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_authority/autosign_command.rb +45 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_authority/interface.rb +324 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_factory.rb +219 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_request.rb +325 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_request_attributes.rb +37 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_revocation_list.rb +111 -0
- data/vendored/puppet/lib/puppet/ssl/certificate_signer.rb +33 -0
- data/vendored/puppet/lib/puppet/ssl/configuration.rb +61 -0
- data/vendored/puppet/lib/puppet/ssl/digest.rb +20 -0
- data/vendored/puppet/lib/puppet/ssl/host.rb +400 -0
- data/vendored/puppet/lib/puppet/ssl/inventory.rb +55 -0
- data/vendored/puppet/lib/puppet/ssl/key.rb +63 -0
- data/vendored/puppet/lib/puppet/ssl/oids.rb +193 -0
- data/vendored/puppet/lib/puppet/ssl/validator.rb +60 -0
- data/vendored/puppet/lib/puppet/ssl/validator/default_validator.rb +173 -0
- data/vendored/puppet/lib/puppet/ssl/validator/no_validator.rb +20 -0
- data/vendored/puppet/lib/puppet/status.rb +40 -0
- data/vendored/puppet/lib/puppet/syntax_checkers.rb +3 -0
- data/vendored/puppet/lib/puppet/syntax_checkers/base64.rb +40 -0
- data/vendored/puppet/lib/puppet/syntax_checkers/json.rb +35 -0
- data/vendored/puppet/lib/puppet/test/test_helper.rb +252 -0
- data/vendored/puppet/lib/puppet/transaction.rb +444 -0
- data/vendored/puppet/lib/puppet/transaction/additional_resource_generator.rb +220 -0
- data/vendored/puppet/lib/puppet/transaction/event.rb +144 -0
- data/vendored/puppet/lib/puppet/transaction/event_manager.rb +167 -0
- data/vendored/puppet/lib/puppet/transaction/persistence.rb +99 -0
- data/vendored/puppet/lib/puppet/transaction/report.rb +468 -0
- data/vendored/puppet/lib/puppet/transaction/resource_harness.rb +318 -0
- data/vendored/puppet/lib/puppet/type.rb +2665 -0
- data/vendored/puppet/lib/puppet/type/augeas.rb +211 -0
- data/vendored/puppet/lib/puppet/type/component.rb +88 -0
- data/vendored/puppet/lib/puppet/type/computer.rb +66 -0
- data/vendored/puppet/lib/puppet/type/cron.rb +480 -0
- data/vendored/puppet/lib/puppet/type/exec.rb +623 -0
- data/vendored/puppet/lib/puppet/type/file.rb +1039 -0
- data/vendored/puppet/lib/puppet/type/file/checksum.rb +50 -0
- data/vendored/puppet/lib/puppet/type/file/checksum_value.rb +54 -0
- data/vendored/puppet/lib/puppet/type/file/content.rb +160 -0
- data/vendored/puppet/lib/puppet/type/file/ctime.rb +20 -0
- data/vendored/puppet/lib/puppet/type/file/data_sync.rb +93 -0
- data/vendored/puppet/lib/puppet/type/file/ensure.rb +192 -0
- data/vendored/puppet/lib/puppet/type/file/group.rb +41 -0
- data/vendored/puppet/lib/puppet/type/file/mode.rb +177 -0
- data/vendored/puppet/lib/puppet/type/file/mtime.rb +18 -0
- data/vendored/puppet/lib/puppet/type/file/owner.rb +44 -0
- data/vendored/puppet/lib/puppet/type/file/selcontext.rb +141 -0
- data/vendored/puppet/lib/puppet/type/file/source.rb +356 -0
- data/vendored/puppet/lib/puppet/type/file/target.rb +87 -0
- data/vendored/puppet/lib/puppet/type/file/type.rb +19 -0
- data/vendored/puppet/lib/puppet/type/filebucket.rb +117 -0
- data/vendored/puppet/lib/puppet/type/group.rb +209 -0
- data/vendored/puppet/lib/puppet/type/host.rb +95 -0
- data/vendored/puppet/lib/puppet/type/interface.rb +121 -0
- data/vendored/puppet/lib/puppet/type/k5login.rb +165 -0
- data/vendored/puppet/lib/puppet/type/macauthorization.rb +167 -0
- data/vendored/puppet/lib/puppet/type/mailalias.rb +46 -0
- data/vendored/puppet/lib/puppet/type/maillist.rb +62 -0
- data/vendored/puppet/lib/puppet/type/mcx.rb +98 -0
- data/vendored/puppet/lib/puppet/type/mount.rb +314 -0
- data/vendored/puppet/lib/puppet/type/nagios_command.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_contact.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_contactgroup.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_host.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_hostdependency.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_hostescalation.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_hostextinfo.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_hostgroup.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_service.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_servicedependency.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_serviceescalation.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_serviceextinfo.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_servicegroup.rb +3 -0
- data/vendored/puppet/lib/puppet/type/nagios_timeperiod.rb +3 -0
- data/vendored/puppet/lib/puppet/type/notify.rb +46 -0
- data/vendored/puppet/lib/puppet/type/package.rb +571 -0
- data/vendored/puppet/lib/puppet/type/resources.rb +180 -0
- data/vendored/puppet/lib/puppet/type/router.rb +17 -0
- data/vendored/puppet/lib/puppet/type/schedule.rb +481 -0
- data/vendored/puppet/lib/puppet/type/scheduled_task.rb +183 -0
- data/vendored/puppet/lib/puppet/type/selboolean.rb +26 -0
- data/vendored/puppet/lib/puppet/type/selmodule.rb +59 -0
- data/vendored/puppet/lib/puppet/type/service.rb +258 -0
- data/vendored/puppet/lib/puppet/type/ssh_authorized_key.rb +143 -0
- data/vendored/puppet/lib/puppet/type/sshkey.rb +83 -0
- data/vendored/puppet/lib/puppet/type/stage.rb +27 -0
- data/vendored/puppet/lib/puppet/type/tidy.rb +345 -0
- data/vendored/puppet/lib/puppet/type/user.rb +794 -0
- data/vendored/puppet/lib/puppet/type/vlan.rb +26 -0
- data/vendored/puppet/lib/puppet/type/whit.rb +34 -0
- data/vendored/puppet/lib/puppet/type/yumrepo.rb +439 -0
- data/vendored/puppet/lib/puppet/type/zfs.rb +154 -0
- data/vendored/puppet/lib/puppet/type/zone.rb +382 -0
- data/vendored/puppet/lib/puppet/type/zpool.rb +91 -0
- data/vendored/puppet/lib/puppet/util.rb +700 -0
- data/vendored/puppet/lib/puppet/util/at_fork.rb +35 -0
- data/vendored/puppet/lib/puppet/util/at_fork/noop.rb +18 -0
- data/vendored/puppet/lib/puppet/util/at_fork/solaris.rb +160 -0
- data/vendored/puppet/lib/puppet/util/autoload.rb +226 -0
- data/vendored/puppet/lib/puppet/util/backups.rb +86 -0
- data/vendored/puppet/lib/puppet/util/character_encoding.rb +98 -0
- data/vendored/puppet/lib/puppet/util/checksums.rb +363 -0
- data/vendored/puppet/lib/puppet/util/classgen.rb +228 -0
- data/vendored/puppet/lib/puppet/util/colors.rb +100 -0
- data/vendored/puppet/lib/puppet/util/command_line.rb +190 -0
- data/vendored/puppet/lib/puppet/util/command_line/puppet_option_parser.rb +87 -0
- data/vendored/puppet/lib/puppet/util/command_line/trollop.rb +825 -0
- data/vendored/puppet/lib/puppet/util/constant_inflector.rb +24 -0
- data/vendored/puppet/lib/puppet/util/diff.rb +79 -0
- data/vendored/puppet/lib/puppet/util/docs.rb +128 -0
- data/vendored/puppet/lib/puppet/util/errors.rb +159 -0
- data/vendored/puppet/lib/puppet/util/execution.rb +412 -0
- data/vendored/puppet/lib/puppet/util/execution_stub.rb +26 -0
- data/vendored/puppet/lib/puppet/util/feature.rb +95 -0
- data/vendored/puppet/lib/puppet/util/file_watcher.rb +28 -0
- data/vendored/puppet/lib/puppet/util/fileparsing.rb +375 -0
- data/vendored/puppet/lib/puppet/util/filetype.rb +309 -0
- data/vendored/puppet/lib/puppet/util/http_proxy.rb +207 -0
- data/vendored/puppet/lib/puppet/util/inifile.rb +340 -0
- data/vendored/puppet/lib/puppet/util/instance_loader.rb +79 -0
- data/vendored/puppet/lib/puppet/util/json_lockfile.rb +44 -0
- data/vendored/puppet/lib/puppet/util/ldap.rb +2 -0
- data/vendored/puppet/lib/puppet/util/ldap/connection.rb +71 -0
- data/vendored/puppet/lib/puppet/util/ldap/generator.rb +42 -0
- data/vendored/puppet/lib/puppet/util/ldap/manager.rb +281 -0
- data/vendored/puppet/lib/puppet/util/libuser.rb +12 -0
- data/vendored/puppet/lib/puppet/util/limits.rb +12 -0
- data/vendored/puppet/lib/puppet/util/lockfile.rb +66 -0
- data/vendored/puppet/lib/puppet/util/log.rb +415 -0
- data/vendored/puppet/lib/puppet/util/log/destination.rb +49 -0
- data/vendored/puppet/lib/puppet/util/log/destinations.rb +258 -0
- data/vendored/puppet/lib/puppet/util/logging.rb +311 -0
- data/vendored/puppet/lib/puppet/util/metaid.rb +21 -0
- data/vendored/puppet/lib/puppet/util/methodhelper.rb +32 -0
- data/vendored/puppet/lib/puppet/util/metric.rb +64 -0
- data/vendored/puppet/lib/puppet/util/monkey_patches.rb +108 -0
- data/vendored/puppet/lib/puppet/util/multi_match.rb +51 -0
- data/vendored/puppet/lib/puppet/util/nagios_maker.rb +85 -0
- data/vendored/puppet/lib/puppet/util/network_device.rb +17 -0
- data/vendored/puppet/lib/puppet/util/network_device/base.rb +23 -0
- data/vendored/puppet/lib/puppet/util/network_device/cisco.rb +4 -0
- data/vendored/puppet/lib/puppet/util/network_device/cisco/device.rb +285 -0
- data/vendored/puppet/lib/puppet/util/network_device/cisco/facts.rb +72 -0
- data/vendored/puppet/lib/puppet/util/network_device/cisco/interface.rb +94 -0
- data/vendored/puppet/lib/puppet/util/network_device/config.rb +105 -0
- data/vendored/puppet/lib/puppet/util/network_device/ipcalc.rb +68 -0
- data/vendored/puppet/lib/puppet/util/network_device/transport.rb +5 -0
- data/vendored/puppet/lib/puppet/util/network_device/transport/base.rb +26 -0
- data/vendored/puppet/lib/puppet/util/network_device/transport/ssh.rb +126 -0
- data/vendored/puppet/lib/puppet/util/network_device/transport/telnet.rb +47 -0
- data/vendored/puppet/lib/puppet/util/package.rb +31 -0
- data/vendored/puppet/lib/puppet/util/pidlock.rb +62 -0
- data/vendored/puppet/lib/puppet/util/platform.rb +35 -0
- data/vendored/puppet/lib/puppet/util/plist.rb +155 -0
- data/vendored/puppet/lib/puppet/util/posix.rb +137 -0
- data/vendored/puppet/lib/puppet/util/profiler.rb +53 -0
- data/vendored/puppet/lib/puppet/util/profiler/aggregate.rb +85 -0
- data/vendored/puppet/lib/puppet/util/profiler/around_profiler.rb +67 -0
- data/vendored/puppet/lib/puppet/util/profiler/logging.rb +48 -0
- data/vendored/puppet/lib/puppet/util/profiler/object_counts.rb +17 -0
- data/vendored/puppet/lib/puppet/util/profiler/wall_clock.rb +35 -0
- data/vendored/puppet/lib/puppet/util/provider_features.rb +184 -0
- data/vendored/puppet/lib/puppet/util/psych_support.rb +30 -0
- data/vendored/puppet/lib/puppet/util/rdoc.rb +60 -0
- data/vendored/puppet/lib/puppet/util/rdoc/code_objects.rb +294 -0
- data/vendored/puppet/lib/puppet/util/rdoc/generators/puppet_generator.rb +910 -0
- data/vendored/puppet/lib/puppet/util/rdoc/generators/template/puppet/puppet.rb +1085 -0
- data/vendored/puppet/lib/puppet/util/rdoc/parser.rb +12 -0
- data/vendored/puppet/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +259 -0
- data/vendored/puppet/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +14 -0
- data/vendored/puppet/lib/puppet/util/reference.rb +118 -0
- data/vendored/puppet/lib/puppet/util/resource_template.rb +61 -0
- data/vendored/puppet/lib/puppet/util/retry_action.rb +46 -0
- data/vendored/puppet/lib/puppet/util/rubygems.rb +75 -0
- data/vendored/puppet/lib/puppet/util/run_mode.rb +110 -0
- data/vendored/puppet/lib/puppet/util/selinux.rb +264 -0
- data/vendored/puppet/lib/puppet/util/skip_tags.rb +9 -0
- data/vendored/puppet/lib/puppet/util/splayer.rb +18 -0
- data/vendored/puppet/lib/puppet/util/ssl.rb +53 -0
- data/vendored/puppet/lib/puppet/util/storage.rb +89 -0
- data/vendored/puppet/lib/puppet/util/suidmanager.rb +165 -0
- data/vendored/puppet/lib/puppet/util/symbolic_file_mode.rb +144 -0
- data/vendored/puppet/lib/puppet/util/tag_set.rb +27 -0
- data/vendored/puppet/lib/puppet/util/tagging.rb +118 -0
- data/vendored/puppet/lib/puppet/util/terminal.rb +16 -0
- data/vendored/puppet/lib/puppet/util/user_attr.rb +21 -0
- data/vendored/puppet/lib/puppet/util/warnings.rb +31 -0
- data/vendored/puppet/lib/puppet/util/watched_file.rb +37 -0
- data/vendored/puppet/lib/puppet/util/watcher.rb +17 -0
- data/vendored/puppet/lib/puppet/util/watcher/change_watcher.rb +33 -0
- data/vendored/puppet/lib/puppet/util/watcher/periodic_watcher.rb +37 -0
- data/vendored/puppet/lib/puppet/util/watcher/timer.rb +19 -0
- data/vendored/puppet/lib/puppet/util/windows.rb +35 -0
- data/vendored/puppet/lib/puppet/util/windows/access_control_entry.rb +84 -0
- data/vendored/puppet/lib/puppet/util/windows/access_control_list.rb +113 -0
- data/vendored/puppet/lib/puppet/util/windows/adsi.rb +545 -0
- data/vendored/puppet/lib/puppet/util/windows/api_types.rb +282 -0
- data/vendored/puppet/lib/puppet/util/windows/com.rb +225 -0
- data/vendored/puppet/lib/puppet/util/windows/error.rb +83 -0
- data/vendored/puppet/lib/puppet/util/windows/eventlog.rb +197 -0
- data/vendored/puppet/lib/puppet/util/windows/file.rb +571 -0
- data/vendored/puppet/lib/puppet/util/windows/principal.rb +192 -0
- data/vendored/puppet/lib/puppet/util/windows/process.rb +497 -0
- data/vendored/puppet/lib/puppet/util/windows/registry.rb +374 -0
- data/vendored/puppet/lib/puppet/util/windows/root_certs.rb +108 -0
- data/vendored/puppet/lib/puppet/util/windows/security.rb +857 -0
- data/vendored/puppet/lib/puppet/util/windows/security_descriptor.rb +62 -0
- data/vendored/puppet/lib/puppet/util/windows/sid.rb +282 -0
- data/vendored/puppet/lib/puppet/util/windows/string.rb +16 -0
- data/vendored/puppet/lib/puppet/util/windows/taskscheduler.rb +1267 -0
- data/vendored/puppet/lib/puppet/util/windows/user.rb +309 -0
- data/vendored/puppet/lib/puppet/util/yaml.rb +36 -0
- data/vendored/puppet/lib/puppet/vendor.rb +57 -0
- data/vendored/puppet/lib/puppet/vendor/deep_merge/lib/deep_merge.rb +2 -0
- data/vendored/puppet/lib/puppet/vendor/deep_merge/lib/deep_merge/core.rb +210 -0
- data/vendored/puppet/lib/puppet/vendor/deep_merge/lib/deep_merge/deep_merge_hash.rb +28 -0
- data/vendored/puppet/lib/puppet/vendor/deep_merge/lib/deep_merge/rails_compat.rb +27 -0
- data/vendored/puppet/lib/puppet/vendor/deep_merge/test/test_deep_merge.rb +608 -0
- data/vendored/puppet/lib/puppet/vendor/load_deep_merge.rb +1 -0
- data/vendored/puppet/lib/puppet/vendor/load_pathspec.rb +1 -0
- data/vendored/puppet/lib/puppet/vendor/load_semantic.rb +1 -0
- data/vendored/puppet/lib/puppet/vendor/load_semantic_puppet.rb +1 -0
- data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec.rb +122 -0
- data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +275 -0
- data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/regexspec.rb +17 -0
- data/vendored/puppet/lib/puppet/vendor/pathspec/lib/pathspec/spec.rb +14 -0
- data/vendored/puppet/lib/puppet/vendor/require_vendored.rb +6 -0
- data/vendored/puppet/lib/puppet/vendor/semantic/lib/semantic.rb +5 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb +11 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency.rb +181 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph.rb +60 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/graph_node.rb +117 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/module_release.rb +58 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/source.rb +25 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/dependency/unsatisfiable_graph.rb +31 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/gem_version.rb +3 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +203 -0
- data/vendored/puppet/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +758 -0
- data/vendored/puppet/lib/puppet/version.rb +93 -0
- data/vendored/puppet/lib/puppet_pal.rb +879 -0
- data/vendored/puppet/lib/puppet_x.rb +14 -0
- metadata +1237 -2
@@ -0,0 +1,1039 @@
|
|
1
|
+
require 'digest/md5'
|
2
|
+
require 'cgi'
|
3
|
+
require 'etc'
|
4
|
+
require 'uri'
|
5
|
+
require 'fileutils'
|
6
|
+
require 'enumerator'
|
7
|
+
require 'pathname'
|
8
|
+
require 'puppet/parameter/boolean'
|
9
|
+
require 'puppet/util/diff'
|
10
|
+
require 'puppet/util/checksums'
|
11
|
+
require 'puppet/util/backups'
|
12
|
+
require 'puppet/util/symbolic_file_mode'
|
13
|
+
|
14
|
+
Puppet::Type.newtype(:file) do
|
15
|
+
include Puppet::Util::MethodHelper
|
16
|
+
include Puppet::Util::Checksums
|
17
|
+
include Puppet::Util::Backups
|
18
|
+
include Puppet::Util::SymbolicFileMode
|
19
|
+
|
20
|
+
@doc = "Manages files, including their content, ownership, and permissions.
|
21
|
+
|
22
|
+
The `file` type can manage normal files, directories, and symlinks; the
|
23
|
+
type should be specified in the `ensure` attribute.
|
24
|
+
|
25
|
+
File contents can be managed directly with the `content` attribute, or
|
26
|
+
downloaded from a remote source using the `source` attribute; the latter
|
27
|
+
can also be used to recursively serve directories (when the `recurse`
|
28
|
+
attribute is set to `true` or `local`). On Windows, note that file
|
29
|
+
contents are managed in binary mode; Puppet never automatically translates
|
30
|
+
line endings.
|
31
|
+
|
32
|
+
**Autorequires:** If Puppet is managing the user or group that owns a
|
33
|
+
file, the file resource will autorequire them. If Puppet is managing any
|
34
|
+
parent directories of a file, the file resource will autorequire them."
|
35
|
+
|
36
|
+
feature :manages_symlinks,
|
37
|
+
"The provider can manage symbolic links."
|
38
|
+
|
39
|
+
def self.title_patterns
|
40
|
+
# strip trailing slashes from path but allow the root directory, including
|
41
|
+
# for example "/" or "C:/"
|
42
|
+
[ [ %r{^(/|.+:/|.*[^/])/*\Z}m, [ [ :path ] ] ] ]
|
43
|
+
end
|
44
|
+
|
45
|
+
newparam(:path) do
|
46
|
+
desc <<-'EOT'
|
47
|
+
The path to the file to manage. Must be fully qualified.
|
48
|
+
|
49
|
+
On Windows, the path should include the drive letter and should use `/` as
|
50
|
+
the separator character (rather than `\\`).
|
51
|
+
EOT
|
52
|
+
isnamevar
|
53
|
+
|
54
|
+
validate do |value|
|
55
|
+
unless Puppet::Util.absolute_path?(value)
|
56
|
+
fail Puppet::Error, _("File paths must be fully qualified, not '%{path}'") % { path: value }
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
munge do |value|
|
61
|
+
if value.start_with?('//') and ::File.basename(value) == "/"
|
62
|
+
# This is a UNC path pointing to a share, so don't add a trailing slash
|
63
|
+
::File.expand_path(value)
|
64
|
+
else
|
65
|
+
::File.join(::File.split(::File.expand_path(value)))
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
newparam(:backup) do
|
71
|
+
desc <<-EOT
|
72
|
+
Whether (and how) file content should be backed up before being replaced.
|
73
|
+
This attribute works best as a resource default in the site manifest
|
74
|
+
(`File { backup => main }`), so it can affect all file resources.
|
75
|
+
|
76
|
+
* If set to `false`, file content won't be backed up.
|
77
|
+
* If set to a string beginning with `.`, such as `.puppet-bak`, Puppet will
|
78
|
+
use copy the file in the same directory with that value as the extension
|
79
|
+
of the backup. (A value of `true` is a synonym for `.puppet-bak`.)
|
80
|
+
* If set to any other string, Puppet will try to back up to a filebucket
|
81
|
+
with that title. See the `filebucket` resource type for more details.
|
82
|
+
(This is the preferred method for backup, since it can be centralized
|
83
|
+
and queried.)
|
84
|
+
|
85
|
+
Default value: `puppet`, which backs up to a filebucket of the same name.
|
86
|
+
(Puppet automatically creates a **local** filebucket named `puppet` if one
|
87
|
+
doesn't already exist.)
|
88
|
+
|
89
|
+
Backing up to a local filebucket isn't particularly useful. If you want
|
90
|
+
to make organized use of backups, you will generally want to use the
|
91
|
+
puppet master server's filebucket service. This requires declaring a
|
92
|
+
filebucket resource and a resource default for the `backup` attribute
|
93
|
+
in site.pp:
|
94
|
+
|
95
|
+
# /etc/puppetlabs/puppet/manifests/site.pp
|
96
|
+
filebucket { 'main':
|
97
|
+
path => false, # This is required for remote filebuckets.
|
98
|
+
server => 'puppet.example.com', # Optional; defaults to the configured puppet master.
|
99
|
+
}
|
100
|
+
|
101
|
+
File { backup => main, }
|
102
|
+
|
103
|
+
If you are using multiple puppet master servers, you will want to
|
104
|
+
centralize the contents of the filebucket. Either configure your load
|
105
|
+
balancer to direct all filebucket traffic to a single master, or use
|
106
|
+
something like an out-of-band rsync task to synchronize the content on all
|
107
|
+
masters.
|
108
|
+
EOT
|
109
|
+
|
110
|
+
defaultto "puppet"
|
111
|
+
|
112
|
+
munge do |value|
|
113
|
+
# I don't really know how this is happening.
|
114
|
+
value = value.shift if value.is_a?(Array)
|
115
|
+
|
116
|
+
case value
|
117
|
+
when false, "false", :false
|
118
|
+
false
|
119
|
+
when true, "true", ".puppet-bak", :true
|
120
|
+
".puppet-bak"
|
121
|
+
when String
|
122
|
+
value
|
123
|
+
else
|
124
|
+
self.fail _("Invalid backup type %{value}") % { value: value.inspect }
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
newparam(:recurse) do
|
130
|
+
desc "Whether to recursively manage the _contents_ of a directory. This attribute
|
131
|
+
is only used when `ensure => directory` is set. The allowed values are:
|
132
|
+
|
133
|
+
* `false` --- The default behavior. The contents of the directory will not be
|
134
|
+
automatically managed.
|
135
|
+
* `remote` --- If the `source` attribute is set, Puppet will automatically
|
136
|
+
manage the contents of the source directory (or directories), ensuring
|
137
|
+
that equivalent files and directories exist on the target system and
|
138
|
+
that their contents match.
|
139
|
+
|
140
|
+
Using `remote` will disable the `purge` attribute, but results in faster
|
141
|
+
catalog application than `recurse => true`.
|
142
|
+
|
143
|
+
The `source` attribute is mandatory when `recurse => remote`.
|
144
|
+
* `true` --- If the `source` attribute is set, this behaves similarly to
|
145
|
+
`recurse => remote`, automatically managing files from the source directory.
|
146
|
+
|
147
|
+
This also enables the `purge` attribute, which can delete unmanaged
|
148
|
+
files from a directory. See the description of `purge` for more details.
|
149
|
+
|
150
|
+
The `source` attribute is not mandatory when using `recurse => true`, so you
|
151
|
+
can enable purging in directories where all files are managed individually.
|
152
|
+
|
153
|
+
By default, setting recurse to `remote` or `true` will manage _all_
|
154
|
+
subdirectories. You can use the `recurselimit` attribute to limit the
|
155
|
+
recursion depth.
|
156
|
+
"
|
157
|
+
|
158
|
+
newvalues(:true, :false, :remote)
|
159
|
+
|
160
|
+
validate { |arg| }
|
161
|
+
munge do |value|
|
162
|
+
newval = super(value)
|
163
|
+
case newval
|
164
|
+
when :true; true
|
165
|
+
when :false; false
|
166
|
+
when :remote; :remote
|
167
|
+
else
|
168
|
+
self.fail _("Invalid recurse value %{value}") % { value: value.inspect }
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
newparam(:recurselimit) do
|
174
|
+
desc "How far Puppet should descend into subdirectories, when using
|
175
|
+
`ensure => directory` and either `recurse => true` or `recurse => remote`.
|
176
|
+
The recursion limit affects which files will be copied from the `source`
|
177
|
+
directory, as well as which files can be purged when `purge => true`.
|
178
|
+
|
179
|
+
Setting `recurselimit => 0` is the same as setting `recurse => false` ---
|
180
|
+
Puppet will manage the directory, but all of its contents will be treated
|
181
|
+
as unmanaged.
|
182
|
+
|
183
|
+
Setting `recurselimit => 1` will manage files and directories that are
|
184
|
+
directly inside the directory, but will not manage the contents of any
|
185
|
+
subdirectories.
|
186
|
+
|
187
|
+
Setting `recurselimit => 2` will manage the direct contents of the
|
188
|
+
directory, as well as the contents of the _first_ level of subdirectories.
|
189
|
+
|
190
|
+
This pattern continues for each incremental value of `recurselimit`."
|
191
|
+
|
192
|
+
newvalues(/^[0-9]+$/)
|
193
|
+
|
194
|
+
munge do |value|
|
195
|
+
newval = super(value)
|
196
|
+
case newval
|
197
|
+
when Integer; value
|
198
|
+
when /^\d+$/; Integer(value)
|
199
|
+
else
|
200
|
+
self.fail _("Invalid recurselimit value %{value}") % { value: value.inspect }
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
newparam(:replace, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
206
|
+
desc "Whether to replace a file or symlink that already exists on the local system but
|
207
|
+
whose content doesn't match what the `source` or `content` attribute
|
208
|
+
specifies. Setting this to false allows file resources to initialize files
|
209
|
+
without overwriting future changes. Note that this only affects content;
|
210
|
+
Puppet will still manage ownership and permissions. Defaults to `true`."
|
211
|
+
defaultto :true
|
212
|
+
end
|
213
|
+
|
214
|
+
newparam(:force, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
215
|
+
desc "Perform the file operation even if it will destroy one or more directories.
|
216
|
+
You must use `force` in order to:
|
217
|
+
|
218
|
+
* `purge` subdirectories
|
219
|
+
* Replace directories with files or links
|
220
|
+
* Remove a directory when `ensure => absent`"
|
221
|
+
defaultto false
|
222
|
+
end
|
223
|
+
|
224
|
+
newparam(:ignore) do
|
225
|
+
desc "A parameter which omits action on files matching
|
226
|
+
specified patterns during recursion. Uses Ruby's builtin globbing
|
227
|
+
engine, so shell metacharacters such as `[a-z]*` are fully supported.
|
228
|
+
Matches that would descend into the directory structure are ignored,
|
229
|
+
such as `*/*`."
|
230
|
+
|
231
|
+
validate do |value|
|
232
|
+
unless value.is_a?(Array) or value.is_a?(String) or value == false
|
233
|
+
self.devfail "Ignore must be a string or an Array"
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
newparam(:links) do
|
239
|
+
desc "How to handle links during file actions. During file copying,
|
240
|
+
`follow` will copy the target file instead of the link and `manage`
|
241
|
+
will copy the link itself. When not copying, `manage` will manage
|
242
|
+
the link, and `follow` will manage the file to which the link points."
|
243
|
+
|
244
|
+
newvalues(:follow, :manage)
|
245
|
+
|
246
|
+
defaultto :manage
|
247
|
+
end
|
248
|
+
|
249
|
+
newparam(:purge, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
250
|
+
desc "Whether unmanaged files should be purged. This option only makes
|
251
|
+
sense when `ensure => directory` and `recurse => true`.
|
252
|
+
|
253
|
+
* When recursively duplicating an entire directory with the `source`
|
254
|
+
attribute, `purge => true` will automatically purge any files
|
255
|
+
that are not in the source directory.
|
256
|
+
* When managing files in a directory as individual resources,
|
257
|
+
setting `purge => true` will purge any files that aren't being
|
258
|
+
specifically managed.
|
259
|
+
|
260
|
+
If you have a filebucket configured, the purged files will be uploaded,
|
261
|
+
but if you do not, this will destroy data.
|
262
|
+
|
263
|
+
Unless `force => true` is set, purging will **not** delete directories,
|
264
|
+
although it will delete the files they contain.
|
265
|
+
|
266
|
+
If `recurselimit` is set and you aren't using `force => true`, purging
|
267
|
+
will obey the recursion limit; files in any subdirectories deeper than the
|
268
|
+
limit will be treated as unmanaged and left alone."
|
269
|
+
|
270
|
+
defaultto :false
|
271
|
+
end
|
272
|
+
|
273
|
+
newparam(:sourceselect) do
|
274
|
+
desc "Whether to copy all valid sources, or just the first one. This parameter
|
275
|
+
only affects recursive directory copies; by default, the first valid
|
276
|
+
source is the only one used, but if this parameter is set to `all`, then
|
277
|
+
all valid sources will have all of their contents copied to the local
|
278
|
+
system. If a given file exists in more than one source, the version from
|
279
|
+
the earliest source in the list will be used."
|
280
|
+
|
281
|
+
defaultto :first
|
282
|
+
|
283
|
+
newvalues(:first, :all)
|
284
|
+
end
|
285
|
+
|
286
|
+
newparam(:show_diff, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
287
|
+
desc "Whether to display differences when the file changes, defaulting to
|
288
|
+
true. This parameter is useful for files that may contain passwords or
|
289
|
+
other secret data, which might otherwise be included in Puppet reports or
|
290
|
+
other insecure outputs. If the global `show_diff` setting
|
291
|
+
is false, then no diffs will be shown even if this parameter is true."
|
292
|
+
|
293
|
+
defaultto :true
|
294
|
+
end
|
295
|
+
|
296
|
+
newparam(:validate_cmd) do
|
297
|
+
desc "A command for validating the file's syntax before replacing it. If
|
298
|
+
Puppet would need to rewrite a file due to new `source` or `content`, it
|
299
|
+
will check the new content's validity first. If validation fails, the file
|
300
|
+
resource will fail.
|
301
|
+
|
302
|
+
This command must have a fully qualified path, and should contain a
|
303
|
+
percent (`%`) token where it would expect an input file. It must exit `0`
|
304
|
+
if the syntax is correct, and non-zero otherwise. The command will be
|
305
|
+
run on the target system while applying the catalog, not on the puppet master.
|
306
|
+
|
307
|
+
Example:
|
308
|
+
|
309
|
+
file { '/etc/apache2/apache2.conf':
|
310
|
+
content => 'example',
|
311
|
+
validate_cmd => '/usr/sbin/apache2 -t -f %',
|
312
|
+
}
|
313
|
+
|
314
|
+
This would replace apache2.conf only if the test returned true.
|
315
|
+
|
316
|
+
Note that if a validation command requires a `%` as part of its text,
|
317
|
+
you can specify a different placeholder token with the
|
318
|
+
`validate_replacement` attribute."
|
319
|
+
end
|
320
|
+
|
321
|
+
newparam(:validate_replacement) do
|
322
|
+
desc "The replacement string in a `validate_cmd` that will be replaced
|
323
|
+
with an input file name. Defaults to: `%`"
|
324
|
+
|
325
|
+
defaultto '%'
|
326
|
+
end
|
327
|
+
|
328
|
+
# Autorequire the nearest ancestor directory found in the catalog.
|
329
|
+
autorequire(:file) do
|
330
|
+
req = []
|
331
|
+
path = Pathname.new(self[:path])
|
332
|
+
if !path.root?
|
333
|
+
# Start at our parent, to avoid autorequiring ourself
|
334
|
+
parents = path.parent.enum_for(:ascend)
|
335
|
+
if found = parents.find { |p| catalog.resource(:file, p.to_s) }
|
336
|
+
req << found.to_s
|
337
|
+
end
|
338
|
+
end
|
339
|
+
# if the resource is a link, make sure the target is created first
|
340
|
+
req << self[:target] if self[:target]
|
341
|
+
req
|
342
|
+
end
|
343
|
+
|
344
|
+
# Autorequire the owner and group of the file.
|
345
|
+
{:user => :owner, :group => :group}.each do |type, property|
|
346
|
+
autorequire(type) do
|
347
|
+
if @parameters.include?(property)
|
348
|
+
# The user/group property automatically converts to IDs
|
349
|
+
next unless should = @parameters[property].shouldorig
|
350
|
+
val = should[0]
|
351
|
+
if val.is_a?(Integer) or val =~ /^\d+$/
|
352
|
+
nil
|
353
|
+
else
|
354
|
+
val
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
359
|
+
|
360
|
+
CREATORS = [:content, :source, :target]
|
361
|
+
SOURCE_ONLY_CHECKSUMS = [:none, :ctime, :mtime]
|
362
|
+
|
363
|
+
validate do
|
364
|
+
creator_count = 0
|
365
|
+
CREATORS.each do |param|
|
366
|
+
creator_count += 1 if self.should(param)
|
367
|
+
end
|
368
|
+
creator_count += 1 if @parameters.include?(:source)
|
369
|
+
|
370
|
+
self.fail _("You cannot specify more than one of %{creators}") % { creators: CREATORS.collect { |p| p.to_s}.join(", ") } if creator_count > 1
|
371
|
+
|
372
|
+
self.fail _("You cannot specify a remote recursion without a source") if !self[:source] && self[:recurse] == :remote
|
373
|
+
|
374
|
+
self.fail _("You cannot specify source when using checksum 'none'") if self[:checksum] == :none && !self[:source].nil?
|
375
|
+
|
376
|
+
SOURCE_ONLY_CHECKSUMS.each do |checksum_type|
|
377
|
+
self.fail _("You cannot specify content when using checksum '%{checksum_type}'") % { checksum_type: checksum_type } if self[:checksum] == checksum_type && !self[:content].nil?
|
378
|
+
end
|
379
|
+
|
380
|
+
self.warning _("Possible error: recurselimit is set but not recurse, no recursion will happen") if !self[:recurse] && self[:recurselimit]
|
381
|
+
|
382
|
+
if @parameters[:content] && @parameters[:content].actual_content
|
383
|
+
# Now that we know the checksum, update content (in case it was created before checksum was known).
|
384
|
+
@parameters[:content].value = @parameters[:checksum].sum(@parameters[:content].actual_content)
|
385
|
+
end
|
386
|
+
|
387
|
+
if self[:checksum] && self[:checksum_value] && !send("#{self[:checksum]}?", self[:checksum_value])
|
388
|
+
self.fail _("Checksum value '%{value}' is not a valid checksum type %{checksum}") % { value: self[:checksum_value], checksum: self[:checksum] }
|
389
|
+
end
|
390
|
+
|
391
|
+
self.warning _("Checksum value is ignored unless content or source are specified") if self[:checksum_value] && !self[:content] && !self[:source]
|
392
|
+
|
393
|
+
provider.validate if provider.respond_to?(:validate)
|
394
|
+
end
|
395
|
+
|
396
|
+
def self.[](path)
|
397
|
+
return nil unless path
|
398
|
+
super(path.gsub(/\/+/, '/').sub(/\/$/, ''))
|
399
|
+
end
|
400
|
+
|
401
|
+
def self.instances
|
402
|
+
return []
|
403
|
+
end
|
404
|
+
|
405
|
+
# Determine the user to write files as.
|
406
|
+
def asuser
|
407
|
+
if self.should(:owner) && ! self.should(:owner).is_a?(Symbol)
|
408
|
+
writeable = Puppet::Util::SUIDManager.asuser(self.should(:owner)) {
|
409
|
+
FileTest.writable?(::File.dirname(self[:path]))
|
410
|
+
}
|
411
|
+
|
412
|
+
# If the parent directory is writeable, then we execute
|
413
|
+
# as the user in question. Otherwise we'll rely on
|
414
|
+
# the 'owner' property to do things.
|
415
|
+
asuser = self.should(:owner) if writeable
|
416
|
+
end
|
417
|
+
|
418
|
+
asuser
|
419
|
+
end
|
420
|
+
|
421
|
+
def bucket
|
422
|
+
return @bucket if @bucket
|
423
|
+
|
424
|
+
backup = self[:backup]
|
425
|
+
return nil unless backup
|
426
|
+
return nil if backup =~ /^\./
|
427
|
+
|
428
|
+
unless catalog or backup == "puppet"
|
429
|
+
fail _("Can not find filebucket for backups without a catalog")
|
430
|
+
end
|
431
|
+
|
432
|
+
unless catalog and filebucket = catalog.resource(:filebucket, backup) or backup == "puppet"
|
433
|
+
fail _("Could not find filebucket %{backup} specified in backup") % { backup: backup }
|
434
|
+
end
|
435
|
+
|
436
|
+
return default_bucket unless filebucket
|
437
|
+
|
438
|
+
@bucket = filebucket.bucket
|
439
|
+
|
440
|
+
@bucket
|
441
|
+
end
|
442
|
+
|
443
|
+
def default_bucket
|
444
|
+
Puppet::Type.type(:filebucket).mkdefaultbucket.bucket
|
445
|
+
end
|
446
|
+
|
447
|
+
# Does the file currently exist? Just checks for whether
|
448
|
+
# we have a stat
|
449
|
+
def exist?
|
450
|
+
stat ? true : false
|
451
|
+
end
|
452
|
+
|
453
|
+
def present?(current_values)
|
454
|
+
super && current_values[:ensure] != :false
|
455
|
+
end
|
456
|
+
|
457
|
+
# We have to do some extra finishing, to retrieve our bucket if
|
458
|
+
# there is one.
|
459
|
+
def finish
|
460
|
+
# Look up our bucket, if there is one
|
461
|
+
bucket
|
462
|
+
super
|
463
|
+
end
|
464
|
+
|
465
|
+
# Create any children via recursion or whatever.
|
466
|
+
def eval_generate
|
467
|
+
return [] unless self.recurse?
|
468
|
+
|
469
|
+
recurse
|
470
|
+
end
|
471
|
+
|
472
|
+
def ancestors
|
473
|
+
ancestors = Pathname.new(self[:path]).enum_for(:ascend).map(&:to_s)
|
474
|
+
ancestors.delete(self[:path])
|
475
|
+
ancestors
|
476
|
+
end
|
477
|
+
|
478
|
+
def flush
|
479
|
+
# We want to make sure we retrieve metadata anew on each transaction.
|
480
|
+
@parameters.each do |name, param|
|
481
|
+
param.flush if param.respond_to?(:flush)
|
482
|
+
end
|
483
|
+
@stat = :needs_stat
|
484
|
+
end
|
485
|
+
|
486
|
+
def initialize(hash)
|
487
|
+
# Used for caching clients
|
488
|
+
@clients = {}
|
489
|
+
|
490
|
+
super
|
491
|
+
|
492
|
+
# If they've specified a source, we get our 'should' values
|
493
|
+
# from it.
|
494
|
+
unless self[:ensure]
|
495
|
+
if self[:target]
|
496
|
+
self[:ensure] = :link
|
497
|
+
elsif self[:content]
|
498
|
+
self[:ensure] = :file
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
@stat = :needs_stat
|
503
|
+
end
|
504
|
+
|
505
|
+
# Configure discovered resources to be purged.
|
506
|
+
def mark_children_for_purging(children)
|
507
|
+
children.each do |name, child|
|
508
|
+
next if child[:source]
|
509
|
+
child[:ensure] = :absent
|
510
|
+
end
|
511
|
+
end
|
512
|
+
|
513
|
+
# Create a new file or directory object as a child to the current
|
514
|
+
# object.
|
515
|
+
def newchild(path)
|
516
|
+
full_path = ::File.join(self[:path], path)
|
517
|
+
|
518
|
+
# Add some new values to our original arguments -- these are the ones
|
519
|
+
# set at initialization. We specifically want to exclude any param
|
520
|
+
# values set by the :source property or any default values.
|
521
|
+
# LAK:NOTE This is kind of silly, because the whole point here is that
|
522
|
+
# the values set at initialization should live as long as the resource
|
523
|
+
# but values set by default or by :source should only live for the transaction
|
524
|
+
# or so. Unfortunately, we don't have a straightforward way to manage
|
525
|
+
# the different lifetimes of this data, so we kludge it like this.
|
526
|
+
# The right-side hash wins in the merge.
|
527
|
+
options = @original_parameters.merge(:path => full_path).reject { |param, value| value.nil? }
|
528
|
+
|
529
|
+
# These should never be passed to our children.
|
530
|
+
[:parent, :ensure, :recurse, :recurselimit, :target, :alias, :source].each do |param|
|
531
|
+
options.delete(param) if options.include?(param)
|
532
|
+
end
|
533
|
+
|
534
|
+
self.class.new(options)
|
535
|
+
end
|
536
|
+
|
537
|
+
# Files handle paths specially, because they just lengthen their
|
538
|
+
# path names, rather than including the full parent's title each
|
539
|
+
# time.
|
540
|
+
def pathbuilder
|
541
|
+
# We specifically need to call the method here, so it looks
|
542
|
+
# up our parent in the catalog graph.
|
543
|
+
if parent = parent()
|
544
|
+
# We only need to behave specially when our parent is also
|
545
|
+
# a file
|
546
|
+
if parent.is_a?(self.class)
|
547
|
+
# Remove the parent file name
|
548
|
+
list = parent.pathbuilder
|
549
|
+
list.pop # remove the parent's path info
|
550
|
+
return list << self.ref
|
551
|
+
else
|
552
|
+
return super
|
553
|
+
end
|
554
|
+
else
|
555
|
+
return [self.ref]
|
556
|
+
end
|
557
|
+
end
|
558
|
+
|
559
|
+
# Recursively generate a list of file resources, which will
|
560
|
+
# be used to copy remote files, manage local files, and/or make links
|
561
|
+
# to map to another directory.
|
562
|
+
def recurse
|
563
|
+
children = (self[:recurse] == :remote) ? {} : recurse_local
|
564
|
+
|
565
|
+
if self[:target]
|
566
|
+
recurse_link(children)
|
567
|
+
elsif self[:source]
|
568
|
+
recurse_remote(children)
|
569
|
+
end
|
570
|
+
|
571
|
+
# If we're purging resources, then delete any resource that isn't on the
|
572
|
+
# remote system.
|
573
|
+
mark_children_for_purging(children) if self.purge?
|
574
|
+
|
575
|
+
# REVISIT: sort_by is more efficient?
|
576
|
+
result = children.values.sort { |a, b| a[:path] <=> b[:path] }
|
577
|
+
remove_less_specific_files(result)
|
578
|
+
end
|
579
|
+
|
580
|
+
def remove_less_specific_files(files)
|
581
|
+
existing_files = catalog.vertices.select { |r| r.is_a?(self.class) }
|
582
|
+
self.class.remove_less_specific_files(files, self[:path], existing_files) do |file|
|
583
|
+
file[:path]
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
587
|
+
# This is to fix bug #2296, where two files recurse over the same
|
588
|
+
# set of files. It's a rare case, and when it does happen you're
|
589
|
+
# not likely to have many actual conflicts, which is good, because
|
590
|
+
# this is a pretty inefficient implementation.
|
591
|
+
def self.remove_less_specific_files(files, parent_path, existing_files, &block)
|
592
|
+
# REVISIT: is this Windows safe? AltSeparator?
|
593
|
+
mypath = parent_path.split(::File::Separator)
|
594
|
+
other_paths = existing_files.
|
595
|
+
select { |r| (yield r) != parent_path}.
|
596
|
+
collect { |r| (yield r).split(::File::Separator) }.
|
597
|
+
select { |p| p[0,mypath.length] == mypath }
|
598
|
+
|
599
|
+
return files if other_paths.empty?
|
600
|
+
|
601
|
+
files.reject { |file|
|
602
|
+
path = (yield file).split(::File::Separator)
|
603
|
+
other_paths.any? { |p| path[0,p.length] == p }
|
604
|
+
}
|
605
|
+
end
|
606
|
+
|
607
|
+
# A simple method for determining whether we should be recursing.
|
608
|
+
def recurse?
|
609
|
+
self[:recurse] == true or self[:recurse] == :remote
|
610
|
+
end
|
611
|
+
|
612
|
+
# Recurse the target of the link.
|
613
|
+
def recurse_link(children)
|
614
|
+
perform_recursion(self[:target]).each do |meta|
|
615
|
+
if meta.relative_path == "."
|
616
|
+
self[:ensure] = :directory
|
617
|
+
next
|
618
|
+
end
|
619
|
+
|
620
|
+
children[meta.relative_path] ||= newchild(meta.relative_path)
|
621
|
+
if meta.ftype == "directory"
|
622
|
+
children[meta.relative_path][:ensure] = :directory
|
623
|
+
else
|
624
|
+
children[meta.relative_path][:ensure] = :link
|
625
|
+
children[meta.relative_path][:target] = meta.full_path
|
626
|
+
end
|
627
|
+
end
|
628
|
+
children
|
629
|
+
end
|
630
|
+
|
631
|
+
# Recurse the file itself, returning a Metadata instance for every found file.
|
632
|
+
def recurse_local
|
633
|
+
result = perform_recursion(self[:path])
|
634
|
+
return {} unless result
|
635
|
+
result.inject({}) do |hash, meta|
|
636
|
+
next hash if meta.relative_path == "."
|
637
|
+
|
638
|
+
hash[meta.relative_path] = newchild(meta.relative_path)
|
639
|
+
hash
|
640
|
+
end
|
641
|
+
end
|
642
|
+
|
643
|
+
# Recurse against our remote file.
|
644
|
+
def recurse_remote(children)
|
645
|
+
recurse_remote_metadata.each do |meta|
|
646
|
+
if meta.relative_path == "."
|
647
|
+
self[:checksum] = meta.checksum_type
|
648
|
+
parameter(:source).metadata = meta
|
649
|
+
next
|
650
|
+
end
|
651
|
+
children[meta.relative_path] ||= newchild(meta.relative_path)
|
652
|
+
children[meta.relative_path][:source] = meta.source
|
653
|
+
children[meta.relative_path][:checksum] = meta.checksum_type
|
654
|
+
children[meta.relative_path].parameter(:source).metadata = meta
|
655
|
+
end
|
656
|
+
|
657
|
+
children
|
658
|
+
end
|
659
|
+
|
660
|
+
def recurse_remote_metadata
|
661
|
+
sourceselect = self[:sourceselect]
|
662
|
+
|
663
|
+
total = self[:source].collect do |source|
|
664
|
+
# For each inlined file resource, the catalog contains a hash mapping
|
665
|
+
# source path to lists of metadata returned by a server-side search.
|
666
|
+
if recursive_metadata = catalog.recursive_metadata[title]
|
667
|
+
result = recursive_metadata[source]
|
668
|
+
else
|
669
|
+
result = perform_recursion(source)
|
670
|
+
end
|
671
|
+
|
672
|
+
next unless result
|
673
|
+
return [] if top = result.find { |r| r.relative_path == "." } and top.ftype != "directory"
|
674
|
+
result.each do |data|
|
675
|
+
if data.relative_path == '.'
|
676
|
+
data.source = source
|
677
|
+
else
|
678
|
+
# REMIND: appending file paths to URL may not be safe, e.g. foo+bar
|
679
|
+
data.source = "#{source}/#{data.relative_path}"
|
680
|
+
end
|
681
|
+
end
|
682
|
+
break result if result and ! result.empty? and sourceselect == :first
|
683
|
+
result
|
684
|
+
end.flatten.compact
|
685
|
+
|
686
|
+
# This only happens if we have sourceselect == :all
|
687
|
+
unless sourceselect == :first
|
688
|
+
found = []
|
689
|
+
total.reject! do |data|
|
690
|
+
result = found.include?(data.relative_path)
|
691
|
+
found << data.relative_path unless result
|
692
|
+
result
|
693
|
+
end
|
694
|
+
end
|
695
|
+
|
696
|
+
total
|
697
|
+
end
|
698
|
+
|
699
|
+
def perform_recursion(path)
|
700
|
+
Puppet::FileServing::Metadata.indirection.search(
|
701
|
+
path,
|
702
|
+
:links => self[:links],
|
703
|
+
:recurse => (self[:recurse] == :remote ? true : self[:recurse]),
|
704
|
+
:recurselimit => self[:recurselimit],
|
705
|
+
:source_permissions => self[:source_permissions],
|
706
|
+
:ignore => self[:ignore],
|
707
|
+
:checksum_type => (self[:source] || self[:content]) ? self[:checksum] : :none,
|
708
|
+
:environment => catalog.environment_instance
|
709
|
+
)
|
710
|
+
end
|
711
|
+
|
712
|
+
# Back up and remove the file or directory at `self[:path]`.
|
713
|
+
#
|
714
|
+
# @param [Symbol] should The file type replacing the current content.
|
715
|
+
# @return [Boolean] True if the file was removed, else False
|
716
|
+
# @raises [fail???] If the file could not be backed up or could not be removed.
|
717
|
+
def remove_existing(should)
|
718
|
+
wanted_type = should.to_s
|
719
|
+
current_type = read_current_type
|
720
|
+
|
721
|
+
if current_type.nil?
|
722
|
+
return false
|
723
|
+
end
|
724
|
+
|
725
|
+
if self[:backup]
|
726
|
+
if can_backup?(current_type)
|
727
|
+
backup_existing
|
728
|
+
else
|
729
|
+
self.warning _("Could not back up file of type %{current_type}") % { current_type: current_type }
|
730
|
+
end
|
731
|
+
end
|
732
|
+
|
733
|
+
if wanted_type != "link" and current_type == wanted_type
|
734
|
+
return false
|
735
|
+
end
|
736
|
+
|
737
|
+
case current_type
|
738
|
+
when "directory"
|
739
|
+
return remove_directory(wanted_type)
|
740
|
+
when "link", "file", "fifo", "socket"
|
741
|
+
return remove_file(current_type, wanted_type)
|
742
|
+
else
|
743
|
+
# Including: “blockSpecial”, “characterSpecial”, “unknown”
|
744
|
+
self.fail _("Could not remove files of type %{current_type}") % { current_type: current_type }
|
745
|
+
end
|
746
|
+
end
|
747
|
+
|
748
|
+
def retrieve
|
749
|
+
# This check is done in retrieve to ensure it happens before we try to use
|
750
|
+
# metadata in `copy_source_values`, but so it only fails the resource and not
|
751
|
+
# catalog validation (because that would be a breaking change from Puppet 4).
|
752
|
+
if Puppet.features.microsoft_windows? && parameter(:source) &&
|
753
|
+
[:use, :use_when_creating].include?(self[:source_permissions])
|
754
|
+
#TRANSLATORS "source_permissions => ignore" should not be translated
|
755
|
+
err_msg = _("Copying owner/mode/group from the source file on Windows is not supported; use source_permissions => ignore.")
|
756
|
+
if self[:owner] == nil || self[:group] == nil || self[:mode] == nil
|
757
|
+
# Fail on Windows if source permissions are being used and the file resource
|
758
|
+
# does not have mode owner, group, and mode all set (which would take precedence).
|
759
|
+
self.fail err_msg
|
760
|
+
else
|
761
|
+
# Warn if use source permissions is specified on Windows
|
762
|
+
self.warning err_msg
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
# `checksum_value` implies explicit management of all metadata, so skip metadata
|
767
|
+
# retrieval. Otherwise, if source is set, retrieve metadata for source.
|
768
|
+
if (source = parameter(:source)) && property(:checksum_value).nil?
|
769
|
+
source.copy_source_values
|
770
|
+
end
|
771
|
+
super
|
772
|
+
end
|
773
|
+
|
774
|
+
# Set the checksum, from another property. There are multiple
|
775
|
+
# properties that modify the contents of a file, and they need the
|
776
|
+
# ability to make sure that the checksum value is in sync.
|
777
|
+
def setchecksum(sum = nil)
|
778
|
+
if @parameters.include? :checksum
|
779
|
+
if sum
|
780
|
+
@parameters[:checksum].checksum = sum
|
781
|
+
else
|
782
|
+
# If they didn't pass in a sum, then tell checksum to
|
783
|
+
# figure it out.
|
784
|
+
currentvalue = @parameters[:checksum].retrieve
|
785
|
+
@parameters[:checksum].checksum = currentvalue
|
786
|
+
end
|
787
|
+
end
|
788
|
+
end
|
789
|
+
|
790
|
+
# Should this thing be a normal file? This is a relatively complex
|
791
|
+
# way of determining whether we're trying to create a normal file,
|
792
|
+
# and it's here so that the logic isn't visible in the content property.
|
793
|
+
def should_be_file?
|
794
|
+
return true if self[:ensure] == :file
|
795
|
+
|
796
|
+
# I.e., it's set to something like "directory"
|
797
|
+
return false if e = self[:ensure] and e != :present
|
798
|
+
|
799
|
+
# The user doesn't really care, apparently
|
800
|
+
if self[:ensure] == :present
|
801
|
+
return true unless s = stat
|
802
|
+
return(s.ftype == "file" ? true : false)
|
803
|
+
end
|
804
|
+
|
805
|
+
# If we've gotten here, then :ensure isn't set
|
806
|
+
return true if self[:content]
|
807
|
+
return true if stat and stat.ftype == "file"
|
808
|
+
false
|
809
|
+
end
|
810
|
+
|
811
|
+
# Stat our file. Depending on the value of the 'links' attribute, we
|
812
|
+
# use either 'stat' or 'lstat', and we expect the properties to use the
|
813
|
+
# resulting stat object accordingly (mostly by testing the 'ftype'
|
814
|
+
# value).
|
815
|
+
#
|
816
|
+
# We use the initial value :needs_stat to ensure we only stat the file once,
|
817
|
+
# but can also keep track of a failed stat (@stat == nil). This also allows
|
818
|
+
# us to re-stat on demand by setting @stat = :needs_stat.
|
819
|
+
def stat
|
820
|
+
return @stat unless @stat == :needs_stat
|
821
|
+
|
822
|
+
method = :stat
|
823
|
+
|
824
|
+
# Files are the only types that support links
|
825
|
+
if (self.class.name == :file and self[:links] != :follow) or self.class.name == :tidy
|
826
|
+
method = :lstat
|
827
|
+
end
|
828
|
+
|
829
|
+
@stat = begin
|
830
|
+
Puppet::FileSystem.send(method, self[:path])
|
831
|
+
rescue Errno::ENOENT
|
832
|
+
nil
|
833
|
+
rescue Errno::ENOTDIR
|
834
|
+
nil
|
835
|
+
rescue Errno::EACCES
|
836
|
+
warning _("Could not stat; permission denied")
|
837
|
+
nil
|
838
|
+
end
|
839
|
+
end
|
840
|
+
|
841
|
+
def to_resource
|
842
|
+
resource = super
|
843
|
+
resource.delete(:target) if resource[:target] == :notlink
|
844
|
+
resource
|
845
|
+
end
|
846
|
+
|
847
|
+
# Write out the file. To write content, pass the property as an argument
|
848
|
+
# to delegate writing to; must implement a #write method that takes the file
|
849
|
+
# as an argument.
|
850
|
+
def write(property = nil)
|
851
|
+
remove_existing(:file)
|
852
|
+
|
853
|
+
mode = self.should(:mode) # might be nil
|
854
|
+
mode_int = mode ? symbolic_mode_to_int(mode, Puppet::Util::DEFAULT_POSIX_MODE) : nil
|
855
|
+
|
856
|
+
if write_temporary_file?
|
857
|
+
Puppet::Util.replace_file(self[:path], mode_int) do |file|
|
858
|
+
file.binmode
|
859
|
+
devfail 'a property should have been provided if write_temporary_file? returned true' if property.nil?
|
860
|
+
content_checksum = property.write(file)
|
861
|
+
file.flush
|
862
|
+
begin
|
863
|
+
file.fsync
|
864
|
+
rescue NotImplementedError
|
865
|
+
# fsync may not be implemented by Ruby on all platforms, but
|
866
|
+
# there is absolutely no recovery path if we detect that. So, we just
|
867
|
+
# ignore the return code.
|
868
|
+
#
|
869
|
+
# However, don't be fooled: that is accepting that we are running in
|
870
|
+
# an unsafe fashion. If you are porting to a new platform don't stub
|
871
|
+
# that out.
|
872
|
+
end
|
873
|
+
|
874
|
+
fail_if_checksum_is_wrong(file.path, content_checksum) if validate_checksum?
|
875
|
+
if self[:validate_cmd]
|
876
|
+
output = Puppet::Util::Execution.execute(self[:validate_cmd].gsub(self[:validate_replacement], file.path), :failonfail => true, :combine => true)
|
877
|
+
output.split(/\n/).each { |line|
|
878
|
+
self.debug(line)
|
879
|
+
}
|
880
|
+
end
|
881
|
+
end
|
882
|
+
else
|
883
|
+
umask = mode ? 000 : 022
|
884
|
+
Puppet::Util.withumask(umask) { ::File.open(self[:path], 'wb', mode_int ) { |f| property.write(f) if property } }
|
885
|
+
end
|
886
|
+
|
887
|
+
# make sure all of the modes are actually correct
|
888
|
+
property_fix
|
889
|
+
end
|
890
|
+
|
891
|
+
private
|
892
|
+
|
893
|
+
# Carry the context of sensitive parameters to the the properties that will actually handle that
|
894
|
+
# sensitive data.
|
895
|
+
#
|
896
|
+
# The file type can accept file content from a number of origins and depending on the current
|
897
|
+
# state of the system different properties will be responsible for synchronizing the file
|
898
|
+
# content. This method handles the necessary mapping of originating parameters to the
|
899
|
+
# responsible parameters.
|
900
|
+
def set_sensitive_parameters(sensitive_parameters)
|
901
|
+
# If we have content that's marked as sensitive but the file doesn't exist then the ensure
|
902
|
+
# property will be responsible for syncing content, so we have to mark ensure as sensitive as well.
|
903
|
+
if sensitive_parameters.include?(:content)
|
904
|
+
# The `ensure` parameter is not guaranteed to be defined either and will be conditionally set when
|
905
|
+
# the `content` property is set, so we need to force the creation of the `ensure` property to
|
906
|
+
# set the sensitive context.
|
907
|
+
newattr(:ensure).sensitive = true
|
908
|
+
end
|
909
|
+
|
910
|
+
# The source parameter isn't actually a property but works by injecting information into the
|
911
|
+
# content property. In order to preserve the intended sensitive context we need to mark content
|
912
|
+
# as sensitive as well.
|
913
|
+
if sensitive_parameters.include?(:source)
|
914
|
+
sensitive_parameters.delete(:source)
|
915
|
+
parameter(:source).sensitive = true
|
916
|
+
# The `source` parameter will generate the `content` property when the resource state is retrieved
|
917
|
+
# but that's long after we've set the sensitive context. Force the early creation of the `content`
|
918
|
+
# attribute so we can mark it as sensitive.
|
919
|
+
newattr(:content).sensitive = true
|
920
|
+
# As noted above, making the `content` property sensitive requires making the `ensure` property
|
921
|
+
# sensitive as well.
|
922
|
+
newattr(:ensure).sensitive = true
|
923
|
+
end
|
924
|
+
|
925
|
+
super(sensitive_parameters)
|
926
|
+
end
|
927
|
+
|
928
|
+
# @return [String] The type of the current file, cast to a string.
|
929
|
+
def read_current_type
|
930
|
+
stat_info = stat
|
931
|
+
if stat_info
|
932
|
+
stat_info.ftype.to_s
|
933
|
+
else
|
934
|
+
nil
|
935
|
+
end
|
936
|
+
end
|
937
|
+
|
938
|
+
# @return [Boolean] If the current file should be backed up and can be backed up.
|
939
|
+
def can_backup?(type)
|
940
|
+
if type == "directory" and force?
|
941
|
+
# (#18110) Directories cannot be removed without :force,
|
942
|
+
# so it doesn't make sense to back them up unless removing with :force.
|
943
|
+
true
|
944
|
+
elsif type == "file" or type == "link"
|
945
|
+
true
|
946
|
+
else
|
947
|
+
# Including: “blockSpecial”, “characterSpecial”, "fifo", "socket", “unknown”
|
948
|
+
false
|
949
|
+
end
|
950
|
+
end
|
951
|
+
|
952
|
+
# @return [Boolean] if the directory was removed (which is always true currently)
|
953
|
+
# @api private
|
954
|
+
def remove_directory(wanted_type)
|
955
|
+
if force?
|
956
|
+
debug "Removing existing directory for replacement with #{wanted_type}"
|
957
|
+
FileUtils.rmtree(self[:path])
|
958
|
+
stat_needed
|
959
|
+
true
|
960
|
+
else
|
961
|
+
notice _("Not removing directory; use 'force' to override")
|
962
|
+
false
|
963
|
+
end
|
964
|
+
end
|
965
|
+
|
966
|
+
# @return [Boolean] if the file was removed (which is always true currently)
|
967
|
+
# @api private
|
968
|
+
def remove_file(current_type, wanted_type)
|
969
|
+
debug "Removing existing #{current_type} for replacement with #{wanted_type}"
|
970
|
+
Puppet::FileSystem.unlink(self[:path])
|
971
|
+
stat_needed
|
972
|
+
true
|
973
|
+
end
|
974
|
+
|
975
|
+
def stat_needed
|
976
|
+
@stat = :needs_stat
|
977
|
+
end
|
978
|
+
|
979
|
+
# Back up the existing file at a given prior to it being removed
|
980
|
+
# @api private
|
981
|
+
# @raise [Puppet::Error] if the file backup failed
|
982
|
+
# @return [void]
|
983
|
+
def backup_existing
|
984
|
+
unless perform_backup
|
985
|
+
#TRANSLATORS refers to a file which could not be backed up
|
986
|
+
raise Puppet::Error, _("Could not back up; will not remove")
|
987
|
+
end
|
988
|
+
end
|
989
|
+
|
990
|
+
# Should we validate the checksum of the file we're writing?
|
991
|
+
def validate_checksum?
|
992
|
+
self[:checksum] !~ /time/
|
993
|
+
end
|
994
|
+
|
995
|
+
# Make sure the file we wrote out is what we think it is.
|
996
|
+
def fail_if_checksum_is_wrong(path, content_checksum)
|
997
|
+
newsum = parameter(:checksum).sum_file(path)
|
998
|
+
return if [:absent, nil, content_checksum].include?(newsum)
|
999
|
+
|
1000
|
+
self.fail _("File written to disk did not match checksum; discarding changes (%{content_checksum} vs %{newsum})") % { content_checksum: content_checksum, newsum: newsum }
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
def write_temporary_file?
|
1004
|
+
# Unfortunately we don't know the source file size before fetching it so
|
1005
|
+
# let's assume the file won't be empty. Why isn't it part of the metadata?
|
1006
|
+
(c = property(:content) and c.length) || @parameters[:source]
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
# There are some cases where all of the work does not get done on
|
1010
|
+
# file creation/modification, so we have to do some extra checking.
|
1011
|
+
def property_fix
|
1012
|
+
properties.each do |thing|
|
1013
|
+
next unless [:mode, :owner, :group, :seluser, :selrole, :seltype, :selrange].include?(thing.name)
|
1014
|
+
|
1015
|
+
# Make sure we get a new stat object
|
1016
|
+
@stat = :needs_stat
|
1017
|
+
currentvalue = thing.retrieve
|
1018
|
+
thing.sync unless thing.safe_insync?(currentvalue)
|
1019
|
+
end
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
# We put all of the properties in separate files, because there are so many
|
1025
|
+
# of them. The order these are loaded is important, because it determines
|
1026
|
+
# the order they are in the property lit.
|
1027
|
+
require 'puppet/type/file/checksum'
|
1028
|
+
require 'puppet/type/file/content' # can create the file
|
1029
|
+
require 'puppet/type/file/source' # can create the file
|
1030
|
+
require 'puppet/type/file/checksum_value' # can create the file, in place of content
|
1031
|
+
require 'puppet/type/file/target' # creates a different type of file
|
1032
|
+
require 'puppet/type/file/ensure' # can create the file
|
1033
|
+
require 'puppet/type/file/owner'
|
1034
|
+
require 'puppet/type/file/group'
|
1035
|
+
require 'puppet/type/file/mode'
|
1036
|
+
require 'puppet/type/file/type'
|
1037
|
+
require 'puppet/type/file/selcontext' # SELinux file context
|
1038
|
+
require 'puppet/type/file/ctime'
|
1039
|
+
require 'puppet/type/file/mtime'
|