2014-01-14 20:43:50 +00:00
|
|
|
cdist-type__block(7)
|
|
|
|
====================
|
2016-06-23 14:08:59 +00:00
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
cdist-type__block - Manage blocks of text in files
|
2014-01-14 20:43:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
Manage a block of text in an existing file.
|
|
|
|
The block is identified using the prefix and suffix parameters.
|
|
|
|
Everything between prefix and suffix is considered to be a managed block
|
|
|
|
of text.
|
|
|
|
|
|
|
|
|
|
|
|
REQUIRED PARAMETERS
|
|
|
|
-------------------
|
2016-05-20 06:50:56 +00:00
|
|
|
text
|
2014-01-14 20:43:50 +00:00
|
|
|
the text to manage.
|
|
|
|
If text is '-' (dash), take what was written to stdin as the text.
|
|
|
|
|
|
|
|
|
|
|
|
OPTIONAL PARAMETERS
|
|
|
|
-------------------
|
2016-05-20 06:50:56 +00:00
|
|
|
file
|
2014-01-14 20:43:50 +00:00
|
|
|
the file in which to manage the text block.
|
|
|
|
Defaults to object_id.
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
prefix
|
2014-01-14 20:43:50 +00:00
|
|
|
the prefix to add before the text.
|
|
|
|
Defaults to #cdist:__block/$__object_id
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
suffix
|
2016-05-13 20:20:55 +00:00
|
|
|
the suffix to add after the text.
|
2014-01-14 20:43:50 +00:00
|
|
|
Defaults to #/cdist:__block/$__object_id
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
state
|
2014-01-14 20:43:50 +00:00
|
|
|
'present' or 'absent', defaults to 'present'
|
|
|
|
|
|
|
|
|
|
|
|
MESSAGES
|
|
|
|
--------
|
2016-05-20 06:50:56 +00:00
|
|
|
add
|
2014-01-14 20:43:50 +00:00
|
|
|
block was added
|
2016-05-20 06:50:56 +00:00
|
|
|
update
|
2014-01-14 20:43:50 +00:00
|
|
|
block was updated/changed
|
2016-05-20 06:50:56 +00:00
|
|
|
remove
|
2014-01-14 20:43:50 +00:00
|
|
|
block was removed
|
|
|
|
|
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
--------
|
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
.. code-block:: sh
|
|
|
|
|
|
|
|
# text from argument
|
|
|
|
__block /path/to/file \
|
|
|
|
--prefix '#start' \
|
|
|
|
--suffix '#end' \
|
|
|
|
--text 'some\nblock of\ntext'
|
2014-01-14 20:43:50 +00:00
|
|
|
|
2016-05-20 06:50:56 +00:00
|
|
|
# text from stdin
|
|
|
|
__block some-id \
|
|
|
|
--file /path/to/file \
|
|
|
|
--text - << DONE
|
|
|
|
here some block
|
|
|
|
of text
|
|
|
|
DONE
|
2014-01-14 20:43:50 +00:00
|
|
|
|
|
|
|
|
2016-06-17 19:28:16 +00:00
|
|
|
AUTHORS
|
|
|
|
-------
|
|
|
|
Steven Armstrong <steven-cdist--@--armstrong.cc>
|
2014-01-14 20:43:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
COPYING
|
|
|
|
-------
|
2016-08-10 16:15:54 +00:00
|
|
|
Copyright \(C) 2013 Steven Armstrong. You can redistribute it
|
|
|
|
and/or modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation, either version 3 of the
|
|
|
|
License, or (at your option) any later version.
|