]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
remote: add ainsl sub-command ("append if no such line")
authorSimon Ruderich <simon@ruderich.org>
Sun, 4 Apr 2021 21:35:50 +0000 (23:35 +0200)
committerSimon Ruderich <simon@ruderich.org>
Mon, 5 Apr 2021 07:41:12 +0000 (09:41 +0200)
It is preferred to deploy complete files by putting them in the files/
directory of a group. However, sometimes this is not possible because
parts of the file's content are unknown or managed by other programs or
users. An example is .ssh/authorized_keys which should contain certain
keys but which is also managed manually. `ainsl` permits adding a key to
the file without rewriting it completely.

`ainsl` can be used by specifying the following command:

    $SAFCM_HELPER ainsl /path/to/file line-to-add

Per default non-existent files are an error. To create the file if
necessary use:

    $SAFCM_HELPER ainsl -create /path/to/file line-to-add

The environment variable $SAFCM_HELPER is set when executing commands
and contains the absolute path to the remote helper.


No differences found