cdist/cdist
Evil Ham c030deea3d [__line] Add support for '--state replace'
It is currently counter-intuitive that something like:

    # File '/thing' contents
    #SomeSetting WrongValue

    # Manifest
    __line '/thing' \
           --line 'SomeSeting GoodValue' \
           --regex '^(#[[:space:]]*)?SomeSetting[[:space:]]'

Produces:

    # Resulting '/thing' contents
    #SomeSetting WrongValue

This makes sense given the implementation, but it masks a very common use-case.

Changing the default behaviour for such a base type is not really an option, so
instead we add a `replace` as a valid value for `--state`, which would result
in:

    # Resulting '/thing' contents with: --state replace
    SomeSetting GoodValue

For compatibility, if the regex is missing, `--state replace` behaves just as
`--state present`.
2020-10-09 06:51:44 +02:00
..
conf [__line] Add support for '--state replace' 2020-10-09 06:51:44 +02:00
core Merge branch 'lint/py3-classes' into 'master' 2020-06-21 17:54:56 +02:00
exec Do not subclass object 2020-06-21 16:53:47 +02:00
preos/debootstrap Merge branch 'lint/py3-classes' into 'master' 2020-06-21 17:54:56 +02:00
sphinxext Fix man build failure in newer sphinx versions 2020-06-01 20:22:40 +02:00
test Clarify stdin input 2020-09-21 09:04:05 +02:00
util Remove annoying warnings 2020-06-27 15:55:57 +02:00
__init__.py Adapt; update docs and code style 2020-06-13 13:44:01 +02:00
argparse.py Clarify stdin input 2020-09-21 09:04:05 +02:00
autil.py Add archiving support. 2017-08-09 16:56:02 +02:00
banner.py Some pylint cleaning. 2017-08-22 10:58:30 +02:00
config.py Clarify stdin input 2020-09-21 09:04:05 +02:00
configuration.py Restrict colored_output value to always/never/auto. 2020-06-06 13:45:31 +02:00
emulator.py Expand and split by consecutive require delimiters 2020-08-24 07:16:28 +02:00
flock.py Fix emulator colored logging 2020-06-11 14:16:37 +02:00
hostsource.py Do not subclass object 2020-06-21 16:53:47 +02:00
info.py Merge branch 'lint/py3-classes' into 'master' 2020-06-21 17:54:56 +02:00
install.py Merge branch 'lint/no-python-shebangs' into 'master' 2020-06-21 17:53:44 +02:00
integration.py Remove unnecessary Python shebangs 2020-06-21 16:03:09 +02:00
inventory.py Clarify stdin input 2020-09-21 09:04:05 +02:00
log.py Merge branch 'lint/no-python-shebangs' into 'master' 2020-06-21 17:53:44 +02:00
message.py Do not subclass object 2020-06-21 16:53:47 +02:00
mputil.py Further improve parallel execution. 2017-07-26 17:39:07 +02:00
preos.py Do not subclass object 2020-06-21 16:53:47 +02:00
shell.py Do not subclass object 2020-06-21 16:53:47 +02:00