Commit graph

39 commits

Author SHA1 Message Date
Darko Poljak
d17f75a010 Support user defined processes
User defined processes are defined by new cdist beta command 'process'.

Processes can be defined in `process` subdirectory in `$HOME/.cdist` or
in custom directories specified through CDIST_PROCESS_PATH environment
variable.

`<path>/process` processes are defined in subdirectories, where a
directory must contain `__init__.py` file to be recognized as a process,
and it is then imported as a module.

Since scanning and registering processes happens before cdist arguments
are parsed, then standard cdist logging cannot be used in this stage.
This is why CDIST_PROCESS_DEBUG environemnt variable turns on debug
messages.

Dummy example (`~/.cdist/process/homeprocess/__init__.py`):

    #!/usr/bin/env python3
    # -*- coding: utf-8 -*-

    import logging
    import subprocess

    log = logging.getLogger(__name__)

    def register(parent_parser):
        parser = parent_parser.add_parser('cdist-help')
        parser.set_defaults(func=cdist_help)

    def cdist_help(args):
        cmd = [ "cdist", "-h", ]
        log.info("Running my process cdist help")
        subprocess.check_call(cmd)
2020-01-12 15:00:24 +01:00
Darko Poljak
e4596593c0 Add cdist info command 2020-01-04 12:50:12 +01:00
Darko Poljak
4735df1bed Add plugins-dir preos option 2019-12-09 09:48:12 +01:00
4f21bf534d [docs] PreOS: English nitpicking. 2019-12-05 23:14:27 +01:00
Darko Poljak
97bcfcc23c Release preos, i.e. make it non-beta 2019-09-20 19:56:17 +02:00
Darko Poljak
b657ba8221 Fix log level when verbosity option is not specified 2019-09-20 19:51:55 +02:00
Darko Poljak
799ec72369 Implement preos 2019-09-20 07:15:37 +02:00
Darko Poljak
15f01149f9 Update old homepage residual refs and non working git protocol 2019-05-09 08:26:42 +02:00
Darko Poljak
0ab43e2405 Release -j/--jobs option, i.e. make it non-beta 2019-05-03 22:18:19 +02:00
Darko Poljak
a77983aead Reorganize parsers right 2019-01-28 19:09:36 +01:00
Darko Poljak
6acf6f64dc Add timestamp to log messages. 2018-09-23 20:36:57 +02:00
Darko Poljak
fe870ba8ba Loglevel arguments not parsed but accessed #646 2018-03-10 11:12:31 +01:00
Darko Poljak
23292e5cad Fix determining beta value through configuration 2018-03-01 19:33:22 +01:00
Darko Poljak
7ccc959ebd Bugfix: --beta on the commandline does not seem to work #635
Fix argparse parsers.
2018-02-28 23:29:45 +01:00
Darko Poljak
4d39b6af51 Add -4 and -6 params to force IPv4, IPv6 addresses respectively. 2018-02-15 20:33:36 +01:00
Darko Poljak
a993e0f5a9
Support disabling saving output streams 2018-02-07 18:12:15 +01:00
Darko Poljak
3454da076f Add -l/--log-level option. Honor __cdist_loglevel env var. (#572)
Add -l/--log-level option, __cdist_loglevel -> __cdist_log_level; honor __cdist_log_level env var
2017-09-09 21:17:29 +02:00
Darko Poljak
f08ac264a0 pep8 2017-09-07 16:37:49 +02:00
Darko Poljak
97f6517715 Configuration fixes. 2017-09-07 16:13:46 +02:00
Darko Poljak
136f2ecd87 Add helpers for cdist config/install integration. (#551)
Implement simple integration API.
2017-09-01 14:08:50 +02:00
Darko Poljak
bdee7273af Configfile (#559)
Add cdist configuration/config file support.
2017-08-30 23:02:17 +02:00
Darko Poljak
d9cf1590b8 Fix spelling. 2017-08-25 10:50:11 +02:00
Darko Poljak
ceb97fd0ee Fix for mistake in 982bb286f4. 2017-08-19 19:12:30 +02:00
Darko Poljak
982bb286f4 Cleanup options' help and cdist man page. 2017-08-17 08:24:58 +02:00
Darko Poljak
68cb13881f Add archiving support. 2017-08-09 16:56:02 +02:00
Darko Poljak
0af64c01bf Add -p HOST_MAX argument. 2017-07-25 11:12:18 +02:00
Darko Poljak
bb2cc68169 Fix broken text 2017-07-24 19:13:40 +02:00
Darko Poljak
e2a1519332 Merge inventory from beta branch. 2017-07-20 22:04:44 +02:00
Darko Poljak
cef1d215b2 Finally remove deprecated -d/--debug option. 2017-07-04 23:49:43 +02:00
Darko Poljak
c63ab44c9c Define better warning facility. 2017-07-04 23:49:43 +02:00
Darko Poljak
2a9bd77550 Merge custom cache path pattern from beta branch. 2017-07-01 23:59:51 +02:00
Darko Poljak
b7873abf07 Improve english based on Mesar Hameed's contribution. 2017-07-01 09:28:41 +02:00
Steven Armstrong
9cee230ef5 alphabetical order ftw
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2017-06-27 17:47:30 +02:00
Steven Armstrong
93ccf925cd need a way to set remote.base_path from the command line
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2017-06-27 10:36:26 +02:00
Darko Poljak
e32f2110ab Document object prepare and object run parallelization. 2017-06-13 22:54:40 +02:00
Darko Poljak
da4118dcf3 pep8 2017-03-08 19:07:02 +01:00
Darko Poljak
b03bed2425 Better describe -v option. 2017-01-28 13:49:19 +01:00
Darko Poljak
3e763e9e6c list -> set for beta commands and args 2016-12-07 18:36:19 +01:00
Darko Poljak
d0f5d2c459 ugly -> bad 2016-12-03 18:24:37 +01:00