From e6d7a1ec24144312102b0e48fef36ec4393904c6 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Fri, 10 Mar 2023 11:01:54 +0100 Subject: Update docs --- share/doc/bashtard.1.scd | 13 ++++++++++++- share/doc/bashtard.3.scd | 18 +++++++++++++++++- share/doc/bashtard.7.scd | 7 +++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/share/doc/bashtard.1.scd b/share/doc/bashtard.1.scd index aabc2d7..8f6e4b4 100644 --- a/share/doc/bashtard.1.scd +++ b/share/doc/bashtard.1.scd @@ -1,6 +1,6 @@ bashtard(1) -; SPDX-FileCopyrightText: 2022 Patrick Spek +; SPDX-FileCopyrightText: 2023 Patrick Spek ; SPDX-License-Identifier: AGPL-3.0-or-later # NAME @@ -12,8 +12,10 @@ bashtard - A Bash-based configuration management utility *bashtard* -h++ *bashtard* add <_playbook_>++ *bashtard* del <_playbook_>++ +*bashtard* diff++ *bashtard* init [_repository_]++ *bashtard* pkg <_install_|_uninstall_> <_name_>++ +*bashtard* pull++ *bashtard* ssh <_command_>++ *bashtard* sync [_playbook_]++ *bashtard* var [-p _playbook_] <_key_>++ @@ -40,6 +42,10 @@ function of the *playbook.bash* file in the root of the playbook directory. It also removes the playbook name from the host's registry, no longer including it during a *sync*. +## diff + +Show current uncommitted changes present in the etcdir. + ## init Initializes *bashtard*, creating the required directory structure in @@ -56,6 +62,11 @@ Allows direct interaction with the *pkg_\*()* functions provided by the *bashtard* utility library. This in turn makes allows a user to use a single package management interface accross all their machines. +## pull + +Perform a git pull on the etcdir, but without syncing all the playbooks +afterwards. + ## ssh Run a given command over SSH to all configured nodes. Every node needs to have diff --git a/share/doc/bashtard.3.scd b/share/doc/bashtard.3.scd index 341d8fc..0f582fa 100644 --- a/share/doc/bashtard.3.scd +++ b/share/doc/bashtard.3.scd @@ -1,6 +1,6 @@ bashtard(3) -; SPDX-FileCopyrightText: 2022 Patrick Spek +; SPDX-FileCopyrightText: 2023 Patrick Spek ; SPDX-License-Identifier: AGPL-3.0-or-later # NAME @@ -46,6 +46,13 @@ more information on this. The name of the currently running playbook. +## BASHTARD_PLAYBOOK_VARS + +An associative array, in which the keys are the config keys. The value of each +element is a space-seperated list of attributes to which the config value must +adhere. Currently, only _required_ is available, forcing a variable's value to +be non-empty when the playbook is ran. + # FUNCTIONS ## config $key @@ -75,6 +82,15 @@ resolve the *pkg.nginx*, and install whichever value it came up with. These are generally defined in the *os.d* of a *playbook*, to handle situations where certain systems name their packages differently. +## playbook_path $name + +The *playbook_path()* function is a convenience function to allow easy access to +various (absolute) paths that are useful during playbook exection. Currently, +the following _name_ arguments are accepted: + +- *base* +- *data* + ## svc $action $svc The *svc()* function abstracts away the running system's service manager, diff --git a/share/doc/bashtard.7.scd b/share/doc/bashtard.7.scd index 5fb1e96..6413f52 100644 --- a/share/doc/bashtard.7.scd +++ b/share/doc/bashtard.7.scd @@ -14,6 +14,13 @@ bashtard - A Bash-based configuration management utility The defaults file is a _bashtard(5)_ key-value file. It specifies the values of variables in case there are no host or os specific values. +# data.d + +The *data.d* directory contains a directory for each playbook that actively uses +it. It stores data generated or otherwise used by the playbook between +consecutive runs. This allows a playbook writer to keep a clear seperation +between a user's data and the playbook. + # hosts.d The *hosts.d* directory contains one file for each specific host you're managing -- cgit v1.1