betadots / puppet-bolt_pe Goto Github PK
View Code? Open in Web Editor NEWBolt tasks and plans for PE
License: GNU Affero General Public License v3.0
Bolt tasks and plans for PE
License: GNU Affero General Public License v3.0
if we put the output into on json key, we can handle the output better in a plan.
instead returning: ["node1, "node2"]
return: {"nodes": ["node1", "node2"]}
then we cann acces them with $nodes.first.value
instead of parsejson($nodes.first.value['_output'].strip)
and $nodes.first.value
you can merge then into the next task/plan/step
run_task(some::task, $$nodes.first.value['nodes']
, "a name")
e.g. querying the Development environment cuases the following PuppetDB error:
Error executing query '["from" "nodes" ["and" ["and" ["=" "trusted.authenticated" "remote"] ["and" ["and" ["=" "trusted.extensions.pp_environment" "development"]] ["and" ["~" "certname" ".*"]] ["and" ["~" "certname" ".*"]]]] ["=" "node_state" "active"]]]'
with query options '{:limit nil, :offset nil, :order_by nil, :node-purge-ttl #object[org.joda.time.Period 0x2bc29f78 "P14D"], :add-agent-report-filter true}'.
Returning a 400 error code.
java.lang.IllegalArgumentException:
'trusted.authenticated' is not a queryable object for nodes.
Known queryable objects are 'cached_catalog_status', 'catalog_environment', 'catalog_timestamp', 'certname', 'deactivated', 'expired', 'facts_environment', 'facts_timestamp', 'latest_report_corrective_change', 'latest_report_hash', 'latest_report_job_id', 'latest_report_noop', 'latest_report_noop_pending', 'latest_report_status', 'report_environment', and 'report_timestamp'
'trusted.extensions.pp_environment' is not a queryable object for nodes.
Known queryable objects are 'cached_catalog_status', 'catalog_environment', 'catalog_timestamp', 'certname', 'deactivated', 'expired', 'facts_environment', 'facts_timestamp', 'latest_report_corrective_change', 'latest_report_hash', 'latest_report_job_id', 'latest_report_noop', 'latest_report_noop_pending', 'latest_report_status', 'report_environment', and 'report_timestamp'
Running the get_node_groups plan via PE console causes an error, because the function is executed as pe-orchestration-services user and not as root:
Plan output
{
"msg" : "No such file or directory - /opt/puppetlabs/server/data/orchestration-services/.puppetlabs/etc/puppet/ssl/certs/puppet5.dtt.example42.training.pem",
"kind" : "bolt/plan-failure",
"details" : {
"class" : "Bolt::PAL::PALError"
}
}
I am unsure if we should switch to a task instead.
@rwaffen any ideas?
implement error handling based on task error handling.
https://puppet.com/docs/bolt/latest/writing_tasks.html#returning-errors-in-tasks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.