Skip to content

Commit

Permalink
Add doc for editing configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tailhook committed Apr 27, 2018
1 parent 3515e50 commit 5d596fc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions doc/use-cases/editing-configs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
==============
Remote Editing
==============


Setup
=====

Initial setup is the same as for :ref:`syncing-configs`.

The most important thing is this one:

.. code-block:: yaml
:emphasize-lines: 3
directory: /etc/daemonio-configs
num-levels: 1
append-only: false
upload-keys: [my_daemonio]
Client setup is also the same. If you can ``sync --replace`` you can also
edit some file:


How it Works
============

.. code-block:: console
ciruela edit server.name --dir /my-daemonio/current --file /config.yaml
This will do the following:

1. Download a specified file from a specified directory
2. Launch whatever is specified in ``CIRUELA_EDITOR``, ``VISUAL`` or
``EDITOR`` environment variables (in that order) or ``vim`` if none.
2. If editor is exited successfully upload the new file back to the original
directory


1 change: 1 addition & 0 deletions doc/use-cases/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ In this examples we use all the defaults:
:caption: Contents:

syncing-configs
editing-configs
2 changes: 2 additions & 0 deletions doc/use-cases/syncing-configs.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _syncing-configs:

===============
Syncing Configs
===============
Expand Down

0 comments on commit 5d596fc

Please sign in to comment.