diff --git a/CHANGELOG.md b/CHANGELOG.md index d77ad82b..35ce52b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how ## Unreleased +## 1.1.0 - 2021-01-27 + +### Added + +- ([GH-282](https://github.com/puppetlabs/puppet-editor-services/issues/282)) Add support for Puppet 7 and Ruby 2.7 +- ([GH-289](https://github.com/puppetlabs/puppet-editor-services/issues/289)) Make Format On Type file size configurable + +### Fixed + +- ([GH-189](https://github.com/puppetlabs/puppet-editor-services/issues/189)) Reset PuppetLint configuration for each call + ## 1.0.1 - 2020-10-14 ### Changed diff --git a/lib/puppet-languageserver/static_data/bolt-boltlib.json b/lib/puppet-languageserver/static_data/bolt-boltlib.json index b4c70e6b..50600e55 100644 --- a/lib/puppet-languageserver/static_data/bolt-boltlib.json +++ b/lib/puppet-languageserver/static_data/bolt-boltlib.json @@ -1 +1 @@ -{"datatypes":[{"key":"ResultSet","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"results","default_value":null,"doc":"","types":"Array[Variant[Result, ApplyResult]]"}],"is_type_alias":false},{"key":"Target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"uri","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"safe_name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"target_alias","default_value":null,"doc":"","types":"Optional[Variant[String[1], Array[String[1]]]]"},{"key":"config","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"vars","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"facts","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"features","default_value":null,"doc":"","types":"Optional[Array[String[1]]]"},{"key":"plugin_hooks","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"resources","default_value":null,"doc":"","types":"Optional[Hash[String[1], ResourceInstance]]"}],"is_type_alias":false},{"key":"ResourceInstance","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"target","default_value":null,"doc":"","types":"Target"},{"key":"type","default_value":null,"doc":"","types":"Variant[String[1], Type[Resource]]"},{"key":"title","default_value":null,"doc":"","types":"String[1]"},{"key":"state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"desired_state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"events","default_value":null,"doc":"","types":"Optional[Array[Hash[String[1], Data]]]"}],"is_type_alias":false},{"key":"Result","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"value","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"ApplyResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"report","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"Boltlib::PlanResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":"Variant[Boolean, Numeric, String, Undef, Error, Result, ApplyResult, ResultSet, Target, ResourceInstance, Array[Boltlib::PlanResult], Hash[String, Boltlib::PlanResult]]","attributes":[],"is_type_alias":true},{"key":"Boltlib::TargetSpec","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"A TargetSpec represents any String, Target or combination thereof that can be\npassed to get_targets() to return an Array[Target]. Generally, users\nshouldn't need to worry about the distinction between TargetSpec and\nTarget/Array[Target], since the run_* functions will all handle them both\nautomatically. But for use cases that need to deal with the exact list of\nTargets that will be used, get_targets() will return that.","alias_of":"Variant[String[1], Target, Array[Boltlib::TargetSpec]]","attributes":[],"is_type_alias":true}],"functions":[{"key":"resolve_references","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","function_version":4,"signatures":[{"key":"resolve_references(Data $references)","doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","return_types":["Data"],"parameters":[{"name":"references","doc":"A hash of reference data to resolve.","types":["Data"],"signature_key_offset":24,"signature_key_length":11}]}]},{"key":"puppetdb_query","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Makes a query to {https://puppet.com/docs/puppetdb/latest/index.html puppetdb}\nusing Bolt's PuppetDB client.","function_version":4,"signatures":[{"key":"puppetdb_query(Variant[String, Array[Data]] $query)","doc":"Makes a query to {https://puppet.com/docs/puppetdb/latest/index.html puppetdb}\nusing Bolt's PuppetDB client.","return_types":["Array[Data]"],"parameters":[{"name":"query","doc":"A PQL query.\n{https://puppet.com/docs/puppetdb/latest/api/query/tutorial-pql.html Learn more about Puppet's query language, PQL}","types":["Variant[String, Array[Data]]"],"signature_key_offset":44,"signature_key_length":6}]}]},{"key":"upload_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given file or directory to the given set of targets and returns the result from each upload.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":116,"signature_key_length":8}]},{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":92,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":137,"signature_key_length":8}]}]},{"key":"puppetdb_fact","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","function_version":4,"signatures":[{"key":"puppetdb_fact(Array[String] $certnames)","doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","return_types":["Hash[String, Data]"],"parameters":[{"name":"certnames","doc":"Array of certnames.","types":["Array[String]"],"signature_key_offset":28,"signature_key_length":10}]}]},{"key":"get_targets","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_targets(Boltlib::TargetSpec $names)","doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","return_types":["Array[Target]"],"parameters":[{"name":"names","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":32,"signature_key_length":6}]}]},{"key":"run_task","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` on the given set of targets and returns the result from each.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $args)","doc":"Run a task.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":92,"signature_key_length":5}]},{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $args)","doc":"Run a task, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":78,"signature_key_length":12},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":123,"signature_key_length":5}]}]},{"key":"get_target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","function_version":4,"signatures":[{"key":"get_target(Boltlib::TargetSpec $name)","doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","return_types":["Target"],"parameters":[{"name":"name","doc":"A Target name.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":5}]}]},{"key":"run_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs the `plan` referenced by its name. A plan is autoloaded from `$MODULEROOT/plans`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_plan(String $plan_name, Optional[Hash] $args)","doc":"Run a plan","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":43,"signature_key_length":5}]},{"key":"run_plan(String $plan_name, Boltlib::TargetSpec $targets, Optional[Hash] $args)","doc":"Run a plan, specifying `$nodes` or `$targets` as a positional argument.\n\n> **Note:** When running a plan with both a `$nodes` and `$targets` parameter, and using the second\npositional argument, the plan will fail.","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":48,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":73,"signature_key_length":5}]}]},{"key":"without_default_logging","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"without_default_logging(Callable[0, 0] &$block)","doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","return_types":["Undef"],"parameters":[{"name":"&block","doc":"The block where action logging is suppressed.","types":["Callable[0, 0]"],"signature_key_offset":39,"signature_key_length":7}]}]},{"key":"facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns the facts hash for a target.","function_version":4,"signatures":[{"key":"facts(Target $target)","doc":"Returns the facts hash for a target.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":13,"signature_key_length":7}]}]},{"key":"run_task_with","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` with target-specific parameters on the given set of targets and\nreturns the result from each. This function differs from {run_task} by accepting a block that returns\na `Hash` of target-specific parameters that are passed to the task. This can be used to send parameters\nbased on a target's attributes, such as its `facts`, or to use conditional logic to determine the\nparameters a task should receive for a specific target.\n\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block\n\n> **Note:** Not available to targets using the pcp transport","function_version":4,"signatures":[{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":97,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":124,"signature_key_length":7}]},{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":83,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":128,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":155,"signature_key_length":7}]}]},{"key":"download_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Downloads the given file or directory from the given set of targets and saves it to a directory\nmatching the target's name under the given destination directory. Returns the result from each\ndownload. This does nothing if the list of targets is empty.\n\n> **Note:** Existing content in the destination directory is deleted before downloading from\n> the targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":118,"signature_key_length":8}]},{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":94,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":139,"signature_key_length":8}]}]},{"key":"wait_until_available","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"wait_until_available(Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":41,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":82,"signature_key_length":8}]}]},{"key":"resource","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Lookup a resource in the target's data.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).","function_version":4,"signatures":[{"key":"resource(Target $target, Type[Resource] $type, String[1] $title)","doc":"Lookup a resource in the target's data.","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["Type[Resource]"],"signature_key_offset":40,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]},{"key":"resource(Target $target, String[1] $type, String[1] $title)","doc":"Lookup a resource in the target's data, referring to resource as a string","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["String[1]"],"signature_key_offset":35,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":52,"signature_key_length":6}]}]},{"key":"set_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets one or more ResourceInstances on a Target. This function does not apply or modify\nresources on a target.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_resources(Target $target, Hash $resource)","doc":"Set a single resource from a data hash.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The resource data hash used to set a resource on the target.","types":["Hash"],"signature_key_offset":35,"signature_key_length":9}]},{"key":"set_resources(Target $target, ResourceInstance $resource)","doc":"Set a single resource from a `ResourceInstance` object","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The `ResourceInstance` object to set on the target.","types":["ResourceInstance"],"signature_key_offset":47,"signature_key_length":9}]},{"key":"set_resources(Target $target, Array[Variant[Hash, ResourceInstance]] $resources)","doc":"Set multiple resources from an array of data hashes and `ResourceInstance` objects.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resources","doc":"The resource data hashes and `ResourceInstance` objects to set on the target.","types":["Array[Variant[Hash, ResourceInstance]]"],"signature_key_offset":69,"signature_key_length":10}]}]},{"key":"catch_errors","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"catch_errors(Optional[Array[String[1]]] $error_types, Callable[0, 0] &$block)","doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"error_types","doc":"An array of error types to catch","types":["Optional[Array[String[1]]]"],"signature_key_offset":40,"signature_key_length":12},{"name":"&block","doc":"The block of steps to catch errors on","types":["Callable[0, 0]"],"signature_key_offset":69,"signature_key_length":7}]}]},{"key":"write_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"write_file(String $content, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":72,"signature_key_length":8},{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":18,"signature_key_length":8},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":38,"signature_key_length":12},{"name":"options","doc":"","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":113,"signature_key_length":8}]}]},{"key":"set_var","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_var(Target $target, String $key, Data $value)","doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to set the variable for. See {get_targets}.","types":["Target"],"signature_key_offset":15,"signature_key_length":7},{"name":"key","doc":"The key for the variable.","types":["String"],"signature_key_offset":31,"signature_key_length":4},{"name":"value","doc":"The value of the variable.","types":["Data"],"signature_key_offset":42,"signature_key_length":6}]}]},{"key":"vars","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","function_version":4,"signatures":[{"key":"vars(Target $target)","doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"The Target object to get variables from. See {get_targets}.","types":["Target"],"signature_key_offset":12,"signature_key_length":7}]}]},{"key":"set_config","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","function_version":4,"signatures":[{"key":"set_config(Target $target, Variant[String, Array[String]] $key_or_key_path, Any $value)","doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to configure. See {get_targets}.","types":["Target"],"signature_key_offset":18,"signature_key_length":7},{"name":"key_or_key_path","doc":"The configuration setting to update.","types":["Variant[String, Array[String]]"],"signature_key_offset":58,"signature_key_length":16},{"name":"value","doc":"The configuration value","types":["Any"],"signature_key_offset":80,"signature_key_length":6}]}]},{"key":"add_to_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_to_group(Boltlib::TargetSpec $targets, String[1] $group)","doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":33,"signature_key_length":8},{"name":"group","doc":"The name of the group to add targets to.","types":["String[1]"],"signature_key_offset":53,"signature_key_length":6}]}]},{"key":"run_command","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a command on the given set of targets and returns the result from each command execution.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a command.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":93,"signature_key_length":8}]},{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a command, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":69,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":114,"signature_key_length":8}]}]},{"key":"add_facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_facts(Target $target, Hash $facts)","doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":17,"signature_key_length":7},{"name":"facts","doc":"A hash of fact names to values that may include structured facts.","types":["Hash"],"signature_key_offset":31,"signature_key_length":6}]}]},{"key":"set_feature","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_feature(Target $target, String $feature, Optional[Boolean] $value)","doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to add features to. See {get_targets}.","types":["Target"],"signature_key_offset":19,"signature_key_length":7},{"name":"feature","doc":"The string identifying the feature.","types":["String"],"signature_key_offset":35,"signature_key_length":8},{"name":"value","doc":"Whether the feature is supported.","types":["Optional[Boolean]"],"signature_key_offset":63,"signature_key_length":6}]}]},{"key":"get_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_resources(Boltlib::TargetSpec $targets, Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]] $resources)","doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":34,"signature_key_length":8},{"name":"resources","doc":"A resource type or instance, or an array of such.","types":["Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]]"],"signature_key_offset":116,"signature_key_length":10}]}]},{"key":"remove_from_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"remove_from_group(Boltlib::TargetSpec $target, String[1] $group)","doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"target","doc":"A pattern identifying a single target.","types":["Boltlib::TargetSpec"],"signature_key_offset":38,"signature_key_length":7},{"name":"group","doc":"The name of the group to remove the target from.","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]}]},{"key":"fail_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Raises a `Bolt::PlanFailure` exception to signal to callers that the plan failed.\n\nPlan authors should call this function when their plan is not successful. The\nerror may then be caught by another plans `run_plan` function or in Bolt itself\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"fail_plan(String[1] $msg, Optional[String[1]] $kind, Optional[Hash[String[1], Any]] $details, Optional[String[1]] $issue_code)","doc":"Fail a plan, generating an exception from the parameters.","return_types":["Any"],"parameters":[{"name":"msg","doc":"An error message.","types":["String[1]"],"signature_key_offset":20,"signature_key_length":4},{"name":"kind","doc":"An easily matchable error kind.","types":["Optional[String[1]]"],"signature_key_offset":46,"signature_key_length":5},{"name":"details","doc":"Machine-parseable details about the error.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":84,"signature_key_length":8},{"name":"issue_code","doc":"Unused.","types":["Optional[String[1]]"],"signature_key_offset":114,"signature_key_length":11}]},{"key":"fail_plan(Error $error)","doc":"Fail a plan, generating an exception from an existing Error object.","return_types":["Any"],"parameters":[{"name":"error","doc":"An error object.","types":["Error"],"signature_key_offset":16,"signature_key_length":6}]}]},{"key":"run_script","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given script to the given set of targets and returns the result of having each target execute the script.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a script.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":91,"signature_key_length":8}]},{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a script, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":67,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":112,"signature_key_length":8}]}]},{"key":"apply_prep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"apply_prep(Boltlib::TargetSpec $targets, Optional[Hash[String, Data]] $options)","doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":8},{"name":"options","doc":"Options hash.","types":["Optional[Hash[String, Data]]"],"signature_key_offset":70,"signature_key_length":8}]}]}]} \ No newline at end of file +{"datatypes":[{"key":"ResultSet","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"results","default_value":null,"doc":"","types":"Array[Variant[Result, ApplyResult]]"}],"is_type_alias":false},{"key":"Target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"uri","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"safe_name","default_value":null,"doc":"","types":"Optional[String[1]]"},{"key":"target_alias","default_value":null,"doc":"","types":"Optional[Variant[String[1], Array[String[1]]]]"},{"key":"config","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"vars","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"facts","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"features","default_value":null,"doc":"","types":"Optional[Array[String[1]]]"},{"key":"plugin_hooks","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"resources","default_value":null,"doc":"","types":"Optional[Hash[String[1], ResourceInstance]]"}],"is_type_alias":false},{"key":"ResourceInstance","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"target","default_value":null,"doc":"","types":"Target"},{"key":"type","default_value":null,"doc":"","types":"Variant[String[1], Type[Resource]]"},{"key":"title","default_value":null,"doc":"","types":"String[1]"},{"key":"state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"desired_state","default_value":null,"doc":"","types":"Optional[Hash[String[1], Data]]"},{"key":"events","default_value":null,"doc":"","types":"Optional[Array[Hash[String[1], Data]]]"}],"is_type_alias":false},{"key":"Result","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"value","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"ApplyResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":null,"attributes":[{"key":"report","default_value":null,"doc":"","types":"Hash[String[1], Data]"},{"key":"target","default_value":null,"doc":"","types":"Target"}],"is_type_alias":false},{"key":"Boltlib::PlanResult","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"","alias_of":"Variant[Boolean, Numeric, String, Undef, Error, Result, ApplyResult, ResultSet, Target, ResourceInstance, Array[Boltlib::PlanResult], Hash[String, Boltlib::PlanResult]]","attributes":[],"is_type_alias":true},{"key":"Boltlib::TargetSpec","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"A TargetSpec represents any String, Target or combination thereof that can be\npassed to get_targets() to return an Array[Target]. Generally, users\nshouldn't need to worry about the distinction between TargetSpec and\nTarget/Array[Target], since the run_* functions will all handle them both\nautomatically. But for use cases that need to deal with the exact list of\nTargets that will be used, get_targets() will return that.","alias_of":"Variant[String[1], Target, Array[Boltlib::TargetSpec]]","attributes":[],"is_type_alias":true}],"functions":[{"key":"resolve_references","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","function_version":4,"signatures":[{"key":"resolve_references(Data $references)","doc":"Evaluates all `_plugin` references in a hash and returns the resolved reference data.","return_types":["Data"],"parameters":[{"name":"references","doc":"A hash of reference data to resolve.","types":["Data"],"signature_key_offset":24,"signature_key_length":11}]}]},{"key":"puppetdb_query","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","function_version":4,"signatures":[{"key":"puppetdb_query(Variant[String, Array[Data]] $query)","doc":"Makes a query to [puppetdb](https://puppet.com/docs/puppetdb/latest/index.html)\nusing Bolt's PuppetDB client.","return_types":["Array[Data]"],"parameters":[{"name":"query","doc":"A PQL query.\nLearn more about [Puppet's query language](https://puppet.com/docs/puppetdb/latest/api/query/tutorial-pql.html), PQL.","types":["Variant[String, Array[Data]]"],"signature_key_offset":44,"signature_key_length":6}]}]},{"key":"upload_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given file or directory to the given set of targets and returns the result from each upload.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":116,"signature_key_length":8}]},{"key":"upload_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Upload a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"A source path, either an absolute path or a modulename/filename selector for a\nfile or directory in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":7},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":41,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":75,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":92,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":137,"signature_key_length":8}]}]},{"key":"puppetdb_fact","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","function_version":4,"signatures":[{"key":"puppetdb_fact(Array[String] $certnames)","doc":"Collects facts based on a list of certnames.\n\nIf a node is not found in PuppetDB, it's included in the returned hash with an empty facts hash.\nOtherwise, the node is included in the hash with a value that is a hash of its facts.","return_types":["Hash[String, Data]"],"parameters":[{"name":"certnames","doc":"Array of certnames.","types":["Array[String]"],"signature_key_offset":28,"signature_key_length":10}]}]},{"key":"get_targets","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_targets(Boltlib::TargetSpec $names)","doc":"Parses common ways of referring to targets and returns an array of Targets.\n\n> **Note:** Not available in apply block","return_types":["Array[Target]"],"parameters":[{"name":"names","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":32,"signature_key_length":6}]}]},{"key":"run_task","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` on the given set of targets and returns the result from each.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $args)","doc":"Run a task.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":92,"signature_key_length":5}]},{"key":"run_task(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $args)","doc":"Run a task, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":19,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":51,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":78,"signature_key_length":12},{"name":"args","doc":"A hash of arguments to the task. Can also include additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":123,"signature_key_length":5}]}]},{"key":"get_target","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","function_version":4,"signatures":[{"key":"get_target(Boltlib::TargetSpec $name)","doc":"Get a single target from inventory if it exists, otherwise create a new Target.\n\n> **Note:** Calling `get_target('all')` returns an empty array.","return_types":["Target"],"parameters":[{"name":"name","doc":"A Target name.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":5}]}]},{"key":"run_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs the `plan` referenced by its name. A plan is autoloaded from `$MODULEROOT/plans`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_plan(String $plan_name, Optional[Hash] $args)","doc":"Run a plan","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":43,"signature_key_length":5}]},{"key":"run_plan(String $plan_name, Boltlib::TargetSpec $targets, Optional[Hash] $args)","doc":"Run a plan, specifying `$nodes` or `$targets` as a positional argument.\n\n> **Note:** When running a plan with both a `$nodes` and `$targets` parameter, and using the second\npositional argument, the plan will fail.","return_types":["Boltlib::PlanResult"],"parameters":[{"name":"plan_name","doc":"The plan to run.","types":["String"],"signature_key_offset":16,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":48,"signature_key_length":8},{"name":"args","doc":"A hash of arguments to the plan. Can also include additional options.","types":["Optional[Hash]"],"signature_key_offset":73,"signature_key_length":5}]}]},{"key":"without_default_logging","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"without_default_logging(Callable[0, 0] &$block)","doc":"Define a block where default logging is suppressed.\n\nMessages for actions within this block will be logged at `info` level instead\nof `notice`, so they will not be seen normally but will still be present\nwhen `verbose` logging is requested.\n\n> **Note:** Not available in apply block","return_types":["Undef"],"parameters":[{"name":"&block","doc":"The block where action logging is suppressed.","types":["Callable[0, 0]"],"signature_key_offset":39,"signature_key_length":7}]}]},{"key":"facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","function_version":4,"signatures":[{"key":"facts(Target $target)","doc":"Returns the facts hash for a target.\n\nUsing the `facts` function does not automatically collect facts for a target,\nand will only return facts that are currently set in the inventory. To collect\nfacts from a target and set them in the inventory, run the\n[facts](writing_plans.md#collect-facts-from-targets) plan or\n[puppetdb_fact](writing_plans.md#collect-facts-from-puppetdb) plan.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":13,"signature_key_length":7}]}]},{"key":"run_task_with","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a given instance of a `Task` with target-specific parameters on the given set of targets and\nreturns the result from each. This function differs from {run_task} by accepting a block that returns\na `Hash` of target-specific parameters that are passed to the task. This can be used to send parameters\nbased on a target's attributes, such as its `facts`, or to use conditional logic to determine the\nparameters a task should receive for a specific target.\n\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block\n\n> **Note:** Not available to targets using the pcp transport","function_version":4,"signatures":[{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":97,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":124,"signature_key_length":7}]},{"key":"run_task_with(String[1] $task_name, Boltlib::TargetSpec $targets, Optional[String] $description, Optional[Hash[String[1], Any]] $options, Callable[Target] &$block)","doc":"Run a task with target-specific parameters, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"task_name","doc":"The task to run.","types":["String[1]"],"signature_key_offset":24,"signature_key_length":10},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":56,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["Optional[String]"],"signature_key_offset":83,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":128,"signature_key_length":8},{"name":"&block","doc":"A block that returns a `Hash` of target-specific parameters for the task.","types":["Callable[Target]"],"signature_key_offset":155,"signature_key_length":7}]}]},{"key":"download_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Downloads the given file or directory from the given set of targets and saves it to a directory\nmatching the target's name under the given destination directory. Returns the result from each\ndownload. This does nothing if the list of targets is empty.\n\n> **Note:** Existing content in the destination directory is deleted before downloading from\n> the targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":118,"signature_key_length":8}]},{"key":"download_file(String[1] $source, String[1] $destination, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Download a file or directory, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"source","doc":"The absolute path to the file or directory on the target(s).","types":["String[1]"],"signature_key_offset":24,"signature_key_length":7},{"name":"destination","doc":"The relative path to the destination directory on the local system. Expands\nrelative to `/downloads/`.","types":["String[1]"],"signature_key_offset":43,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":77,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":94,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":139,"signature_key_length":8}]}]},{"key":"wait_until_available","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"wait_until_available(Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Wait until all targets accept connections.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":41,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":82,"signature_key_length":8}]}]},{"key":"resource","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Lookup a resource in the target's data.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).","function_version":4,"signatures":[{"key":"resource(Target $target, Type[Resource] $type, String[1] $title)","doc":"Lookup a resource in the target's data.","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["Type[Resource]"],"signature_key_offset":40,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]},{"key":"resource(Target $target, String[1] $type, String[1] $title)","doc":"Lookup a resource in the target's data, referring to resource as a string","return_types":["Optional[ResourceInstance]"],"parameters":[{"name":"target","doc":"The Target object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":16,"signature_key_length":7},{"name":"type","doc":"The type of the resource","types":["String[1]"],"signature_key_offset":35,"signature_key_length":5},{"name":"title","doc":"The title of the resource","types":["String[1]"],"signature_key_offset":52,"signature_key_length":6}]}]},{"key":"set_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets one or more ResourceInstances on a Target. This function does not apply or modify\nresources on a target.\n\nFor more information about resources see [the\ndocumentation](https://puppet.com/docs/puppet/latest/lang_resources.html).\n\n> **Note:** The `ResourceInstance` data type is under active development and is subject to\n change. You can read more about the data type in the [experimental features\n documentation](experimental_features.md#resourceinstance-data-type).\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_resources(Target $target, Hash $resource)","doc":"Set a single resource from a data hash.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The resource data hash used to set a resource on the target.","types":["Hash"],"signature_key_offset":35,"signature_key_length":9}]},{"key":"set_resources(Target $target, ResourceInstance $resource)","doc":"Set a single resource from a `ResourceInstance` object","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add a resource to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resource","doc":"The `ResourceInstance` object to set on the target.","types":["ResourceInstance"],"signature_key_offset":47,"signature_key_length":9}]},{"key":"set_resources(Target $target, Array[Variant[Hash, ResourceInstance]] $resources)","doc":"Set multiple resources from an array of data hashes and `ResourceInstance` objects.","return_types":["Array[ResourceInstance]"],"parameters":[{"name":"target","doc":"The `Target` object to add resources to. See {get_targets}.","types":["Target"],"signature_key_offset":21,"signature_key_length":7},{"name":"resources","doc":"The resource data hashes and `ResourceInstance` objects to set on the target.","types":["Array[Variant[Hash, ResourceInstance]]"],"signature_key_offset":69,"signature_key_length":10}]}]},{"key":"catch_errors","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"catch_errors(Optional[Array[String[1]]] $error_types, Callable[0, 0] &$block)","doc":"Catches errors in a given block and returns them. This will return the\noutput of the block if no errors are raised. Accepts an optional list of\nerror kinds to catch.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"error_types","doc":"An array of error types to catch","types":["Optional[Array[String[1]]]"],"signature_key_offset":40,"signature_key_length":12},{"name":"&block","doc":"The block of steps to catch errors on","types":["Callable[0, 0]"],"signature_key_offset":69,"signature_key_length":7}]}]},{"key":"write_file","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"write_file(String $content, String[1] $destination, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Write contents to a file on the given set of targets.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"content","doc":"File content to write.","types":["String"],"signature_key_offset":18,"signature_key_length":8},{"name":"destination","doc":"An absolute path on the target(s).","types":["String[1]"],"signature_key_offset":38,"signature_key_length":12},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":72,"signature_key_length":8},{"name":"options","doc":"","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":113,"signature_key_length":8}]}]},{"key":"set_var","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_var(Target $target, String $key, Data $value)","doc":"Sets a variable `{ key => value }` for a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to set the variable for. See {get_targets}.","types":["Target"],"signature_key_offset":15,"signature_key_length":7},{"name":"key","doc":"The key for the variable.","types":["String"],"signature_key_offset":31,"signature_key_length":4},{"name":"value","doc":"The value of the variable.","types":["Data"],"signature_key_offset":42,"signature_key_length":6}]}]},{"key":"vars","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","function_version":4,"signatures":[{"key":"vars(Target $target)","doc":"Returns a hash of the 'vars' (variables) assigned to a target.\n\nVars can be assigned through the inventory file or `set_var` function.\nPlan authors can call this function on a target to get the variable hash\nfor that target.","return_types":["Hash[String, Data]"],"parameters":[{"name":"target","doc":"The Target object to get variables from. See {get_targets}.","types":["Target"],"signature_key_offset":12,"signature_key_length":7}]}]},{"key":"set_config","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","function_version":4,"signatures":[{"key":"set_config(Target $target, Variant[String, Array[String]] $key_or_key_path, Any $value)","doc":"Set configuration options on a target.\n\n> **Note:** Not available in apply block\n\n> **Note:** Only compatible with inventory v2","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to configure. See {get_targets}.","types":["Target"],"signature_key_offset":18,"signature_key_length":7},{"name":"key_or_key_path","doc":"The configuration setting to update.","types":["Variant[String, Array[String]]"],"signature_key_offset":58,"signature_key_length":16},{"name":"value","doc":"The configuration value","types":["Any"],"signature_key_offset":80,"signature_key_length":6}]}]},{"key":"add_to_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_to_group(Boltlib::TargetSpec $targets, String[1] $group)","doc":"Adds a target to specified inventory group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":33,"signature_key_length":8},{"name":"group","doc":"The name of the group to add targets to.","types":["String[1]"],"signature_key_offset":53,"signature_key_length":6}]}]},{"key":"run_command","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Runs a command on the given set of targets and returns the result from each command execution.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a command.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":93,"signature_key_length":8}]},{"key":"run_command(String[1] $command, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a command, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"command","doc":"A command to run on target.","types":["String[1]"],"signature_key_offset":22,"signature_key_length":8},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":52,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":69,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":114,"signature_key_length":8}]}]},{"key":"add_facts","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"add_facts(Target $target, Hash $facts)","doc":"Deep merges a hash of facts with the existing facts on a target.\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"A target.","types":["Target"],"signature_key_offset":17,"signature_key_length":7},{"name":"facts","doc":"A hash of fact names to values that may include structured facts.","types":["Hash"],"signature_key_offset":31,"signature_key_length":6}]}]},{"key":"set_feature","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"set_feature(Target $target, String $feature, Optional[Boolean] $value)","doc":"Sets a particular feature to present on a target.\n\nFeatures are used to determine what implementation of a task should be run.\nSupported features are:\n- `powershell`\n- `shell`\n- `puppet-agent`\n\n> **Note:** Not available in apply block","return_types":["Target"],"parameters":[{"name":"target","doc":"The Target object to add features to. See {get_targets}.","types":["Target"],"signature_key_offset":19,"signature_key_length":7},{"name":"feature","doc":"The string identifying the feature.","types":["String"],"signature_key_offset":35,"signature_key_length":8},{"name":"value","doc":"Whether the feature is supported.","types":["Optional[Boolean]"],"signature_key_offset":63,"signature_key_length":6}]}]},{"key":"get_resources","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"get_resources(Boltlib::TargetSpec $targets, Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]] $resources)","doc":"Query the state of resources on a list of targets using resource definitions in Bolt's module path.\nThe results are returned as a list of hashes representing each resource.\n\nRequires the Puppet Agent be installed on the target, which can be accomplished with apply_prep\nor by directly running the `puppet_agent::install` task. In order to be able to reference types without\nstring quoting (for example `get_resources($target, Package)` instead of `get_resources($target, 'Package')`),\nrun the command `bolt puppetfile generate-types` to generate type references in `$Boldir/.resource_types`.\n\n> **Note:** Not available in apply block","return_types":["ResultSet"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":34,"signature_key_length":8},{"name":"resources","doc":"A resource type or instance, or an array of such.","types":["Variant[String, Type[Resource], Array[Variant[String, Type[Resource]]]]"],"signature_key_offset":116,"signature_key_length":10}]}]},{"key":"parallelize","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","function_version":4,"signatures":[{"key":"parallelize(Array[Any] $data, Callable[Any] &$block)","doc":"Map a code block onto an array, where each array element executes in parallel.\nThis function is experimental.\n\n> **Note:** Not available in apply block.","return_types":["Array[Boltlib::PlanResult]"],"parameters":[{"name":"data","doc":"The array to apply the block to.","types":["Array[Any]"],"signature_key_offset":23,"signature_key_length":5},{"name":"&block","doc":"","types":["Callable[Any]"],"signature_key_offset":44,"signature_key_length":7}]}]},{"key":"remove_from_group","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"remove_from_group(Boltlib::TargetSpec $target, String[1] $group)","doc":"Removes a target from the specified inventory group.\n\nThe target is removed from all child groups and all parent groups where the target has\nnot been explicitly defined. A target cannot be removed from the `all` group.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"target","doc":"A pattern identifying a single target.","types":["Boltlib::TargetSpec"],"signature_key_offset":38,"signature_key_length":7},{"name":"group","doc":"The name of the group to remove the target from.","types":["String[1]"],"signature_key_offset":57,"signature_key_length":6}]}]},{"key":"fail_plan","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Raises a `Bolt::PlanFailure` exception to signal to callers that the plan failed.\n\nPlan authors should call this function when their plan is not successful. The\nerror may then be caught by another plans `run_plan` function or in Bolt itself\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"fail_plan(String[1] $msg, Optional[String[1]] $kind, Optional[Hash[String[1], Any]] $details, Optional[String[1]] $issue_code)","doc":"Fail a plan, generating an exception from the parameters.","return_types":["Any"],"parameters":[{"name":"msg","doc":"An error message.","types":["String[1]"],"signature_key_offset":20,"signature_key_length":4},{"name":"kind","doc":"An easily matchable error kind.","types":["Optional[String[1]]"],"signature_key_offset":46,"signature_key_length":5},{"name":"details","doc":"Machine-parseable details about the error.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":84,"signature_key_length":8},{"name":"issue_code","doc":"Unused.","types":["Optional[String[1]]"],"signature_key_offset":114,"signature_key_length":11}]},{"key":"fail_plan(Error $error)","doc":"Fail a plan, generating an exception from an existing Error object.","return_types":["Any"],"parameters":[{"name":"error","doc":"An error object.","types":["Error"],"signature_key_offset":16,"signature_key_length":6}]}]},{"key":"run_script","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Uploads the given script to the given set of targets and returns the result of having each target execute the script.\nThis function does nothing if the list of targets is empty.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, Optional[Hash[String[1], Any]] $options)","doc":"Run a script.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":91,"signature_key_length":8}]},{"key":"run_script(String[1] $script, Boltlib::TargetSpec $targets, String $description, Optional[Hash[String[1], Any]] $options)","doc":"Run a script, logging the provided description.","return_types":["ResultSet"],"parameters":[{"name":"script","doc":"Path to a script to run on target. May be an absolute path or a modulename/filename selector for a\nfile in $MODULEROOT/files.","types":["String[1]"],"signature_key_offset":21,"signature_key_length":7},{"name":"targets","doc":"A pattern identifying zero or more targets. See {get_targets} for accepted patterns.","types":["Boltlib::TargetSpec"],"signature_key_offset":50,"signature_key_length":8},{"name":"description","doc":"A description to be output when calling this function.","types":["String"],"signature_key_offset":67,"signature_key_length":12},{"name":"options","doc":"A hash of additional options.","types":["Optional[Hash[String[1], Any]]"],"signature_key_offset":112,"signature_key_length":8}]}]},{"key":"apply_prep","calling_source":null,"source":null,"line":null,"char":null,"length":null,"doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","function_version":4,"signatures":[{"key":"apply_prep(Boltlib::TargetSpec $targets, Optional[Hash[String, Data]] $options)","doc":"Installs the `puppet-agent` package on targets if needed, then collects facts,\nincluding any custom facts found in Bolt's module path. The package is\ninstalled using either the configured plugin or the `task` plugin with the\n`puppet_agent::install` task.\n\nAgent installation will be skipped if the target includes the `puppet-agent` feature, either as a\nproperty of its transport (PCP) or by explicitly setting it as a feature in Bolt's inventory.\n\n> **Note:** Not available in apply block","return_types":["Any"],"parameters":[{"name":"targets","doc":"A pattern or array of patterns identifying a set of targets.","types":["Boltlib::TargetSpec"],"signature_key_offset":31,"signature_key_length":8},{"name":"options","doc":"Options hash.","types":["Optional[Hash[String, Data]]"],"signature_key_offset":70,"signature_key_length":8}]}]}]} \ No newline at end of file diff --git a/lib/puppet-languageserver/static_data/bolt-secure_env_vars.json b/lib/puppet-languageserver/static_data/bolt-secure_env_vars.json deleted file mode 100644 index 9e26dfee..00000000 --- a/lib/puppet-languageserver/static_data/bolt-secure_env_vars.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/lib/puppet_editor_services/version.rb b/lib/puppet_editor_services/version.rb index 44566891..ebaa1ac1 100644 --- a/lib/puppet_editor_services/version.rb +++ b/lib/puppet_editor_services/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module PuppetEditorServices - PUPPETEDITORSERVICESVERSION = '1.0.1' unless defined? PUPPETEDITORSERVICESVERSION + PUPPETEDITORSERVICESVERSION = '1.1.0' unless defined? PUPPETEDITORSERVICESVERSION # @api public # diff --git a/tools/bolt_introspect/README.md b/tools/bolt_introspect/README.md index e34ecf0e..415e6c75 100644 --- a/tools/bolt_introspect/README.md +++ b/tools/bolt_introspect/README.md @@ -22,5 +22,5 @@ This should regenerate all of the bolt files in `/lib/puppet-languageserver/stat | Component | Version | | --------------- | ------- | -| Bolt | 2.30.0 | -| Editor Services | 1.0.0 | +| Bolt | 2.42.0 | +| Editor Services | 1.1.0 |