<\/p>\n\r\n$ mc-rpc puppetral do type=user name=rip password='$1$xxx'\r\n<\/pre>\n<\/code><\/p>\n
And that will go out, find all my machines and use the Puppet RAL to change my password for me. You can do anything puppet can, manage \/etc\/hosts<\/em>, add users, remove users, packages, services and anything even your own custom types can be used. Distributed and in parallel over any number of hosts.<\/p>\nSome other examples:<\/p>\n
Add a user:
\n<\/p>\n\r\n$ mc-rpc puppetral do type=user name=foo comment=\"Foo User\" managehome=true\r\n<\/pre>\n<\/code><\/p>\n
Run a command using exec, with the magical creates<\/em> option:
\n<\/p>\n\r\n$ mc-rpc puppetral do type=exec name=\"\/bin\/date > \/tmp\/date\" user=root timeout=5 creates=\"\/tmp\/date\"\r\n<\/pre>\n<\/code><\/p>\n
Add an aliases entry:<\/p>\n
<\/p>\n\r\n$ mc-rpc puppetral do type=mailalias name=foo recipient=\"rip@devco.net\" target=\"\/etc\/aliases\"\r\n<\/pre>\n<\/code><\/p>\n
Install a package:<\/p>\n
<\/p>\n\r\n$ mc-rpc puppetral do type=package name=unix2dos ensure=present\r\n<\/pre>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"
Some time ago I wrote how to reuse Puppet providers in your Ruby script, I’ll take that a bit further here and show you to create any kind of resource. Puppet works based on resources and catalogs. A catalog is a collection of resources and it will apply the catalog to a machine. So in […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","footnotes":""},"categories":[7],"tags":[121,78,21,13],"_links":{"self":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1565"}],"collection":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/comments?post=1565"}],"version-history":[{"count":12,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1565\/revisions"}],"predecessor-version":[{"id":1577,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/posts\/1565\/revisions\/1577"}],"wp:attachment":[{"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/media?parent=1565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/categories?post=1565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devco.net\/wp-json\/wp\/v2\/tags?post=1565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}