From 4d799dadf2a67dc59210834f7d0ea8a8487865cb Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 24 Feb 2021 10:57:04 -0700 Subject: README: add "Other things to try" Signed-off-by: Sean Whitton --- README.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'README.rst') diff --git a/README.rst b/README.rst index 538f51e..8a34462 100644 --- a/README.rst +++ b/README.rst @@ -110,6 +110,39 @@ Quick start / introduction ``CONSFIGURATOR:DEPLOY`` function to try out configuring athena using a different connection type than defined here. +Other things to try +------------------- + +Note that some of these violate some of the ideas of declarative configuration +management, because they apply individual properties without updating the +definitions of hosts. Sometimes that's the right thing to do, though, and +Consfigurator makes it easy to reuse your definitions of properties in these +non-declarative ways. + +Apply a security update to all your systems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +It's useful to be able to quickly apply a security update across multiple +machines without otherwise interacting with their configuration. Supposing +you have defined a variable ``*ALL-MY-SERVERS*`` which is a list hosts defined +with ``DEFHOST``, you can evaluate:: + + (dolist (server *all-my-servers*) + (deploy-these :ssh server + (cmd:single "apt-get update && apt-get upgrade openssl"))) + +Regex replace a file across hosts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +With ``*ALL-MY-SERVERS*`` as in the previous example,:: + + (dolist (server *all-my-servers*) + (deploy-these :ssh server + (file:regex-replace-lines "/etc/baz" #?/foo/ "bar"))) + +(relies on CL-INTERPOL syntax being enabled, as it is in the example consfig +above) + Portability and stability ========================= -- cgit v1.2.3