Nico Schottelius
e58a467327
Merge branch 'master' into preos
2013-12-01 18:42:49 +01:00
Nico Schottelius
7cf0d60b08
catch permissionserror when deleting old cache
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-12-01 18:42:07 +01:00
Nico Schottelius
48923d23d8
if ... THEN ;-)
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-12-01 18:37:08 +01:00
Nico Schottelius
adab987994
minor updates for preos
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-29 16:02:00 +01:00
Nico Schottelius
65cab0d0e8
add "preos" subcommand to generate preos
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-28 14:18:24 +01:00
Nico Schottelius
f47d2c22bc
Merge remote-tracking branch 'steven/issue/202'
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
Conflicts:
cdist/conf/type/__link/explorer/type
2013-11-27 16:24:20 +01:00
Nico Schottelius
dfe4274467
Merge remote-tracking branch 'steven/issue/201'
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
Conflicts:
cdist/conf/type/__directory/explorer/stat
cdist/conf/type/__directory/explorer/type
2013-11-27 16:23:16 +01:00
Nico Schottelius
08dbf2e96c
Merge remote-tracking branch 'steven/issue/198'
2013-11-27 16:22:14 +01:00
Steven Armstrong
abf291cb20
add gpl header
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:09:02 +01:00
Steven Armstrong
71b41df733
no late delete
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:09:02 +01:00
Steven Armstrong
6d5686229f
only delete links; delete existing destination before creating links
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:09:02 +01:00
Steven Armstrong
f5a39e5281
add gpl header
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:08:50 +01:00
Steven Armstrong
7b065e931f
rewrite type to work analog to __file and __link
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:08:50 +01:00
Steven Armstrong
d7984df503
make explorers executable
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:08:50 +01:00
Steven Armstrong
6c3b1e3ca0
add gpl header
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-27 16:05:10 +01:00
Nico Schottelius
de4db39f88
Merge remote-tracking branch 'steven/issue/201'
2013-11-27 15:15:03 +01:00
Nico Schottelius
965526a930
Merge remote-tracking branch 'steven/issue/202'
2013-11-27 15:14:10 +01:00
Steven Armstrong
fcfd2d0a3c
refactor so that there is no interaction between code-local and code-remote
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-26 16:31:18 +01:00
Steven Armstrong
a3dea70a97
Revert "first generate and execute *-local, then *-remote"
...
This reverts commit cf22499538266b1b4fac1694254edfd8ba9be68d.
2013-11-26 16:31:18 +01:00
Steven Armstrong
f82c4dc669
no late delete
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-26 16:31:17 +01:00
Steven Armstrong
5918de368d
fix quoting, remove redundant code
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-26 16:31:17 +01:00
Steven Armstrong
12ef3ca4d2
first generate and execute *-local, then *-remote
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-26 16:31:17 +01:00
Steven Armstrong
db29ea8e70
intial take on fixing the file type
...
- upload file in a safer way
- remove destination if it is not a file
- only set attributes if required
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-11-26 16:31:17 +01:00
Nico Schottelius
2f842d56eb
integrate messaging into gencode, manifest
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-26 01:17:37 +01:00
Nico Schottelius
edec2abb1d
adopt first type: __file for messaging
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-26 01:01:44 +01:00
Nico Schottelius
ac5fa7cd64
integrate messaging into cdist
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-26 01:01:30 +01:00
Nico Schottelius
22a83d2c93
add new message object
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-26 00:27:08 +01:00
Nico Schottelius
d1a569fecd
remove bug comments -> no bug here
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-25 23:18:19 +01:00
Nico Schottelius
d00947711d
Merge branch 'master' into notifications
2013-11-25 22:54:36 +01:00
Nico Schottelius
2932b8343f
use printf instead of echo to avoid bash broken echo builtin
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-11-25 19:08:46 +01:00
Nico Schottelius
95513ab538
__line: handle fixed strings correctly, posix gave us -F -x for this case
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-29 12:23:07 +01:00
Steven Armstrong
9db28fab97
no late delete
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-10-15 14:55:35 +02:00
Nico Schottelius
e7e610d829
add state parameter
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-14 22:05:29 +09:00
Nico Schottelius
465749f377
use localedef - locale-gen is a bad wrapper script
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-14 21:38:47 +09:00
Nico Schottelius
e0b009308a
initial template for __locale
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-14 21:27:07 +09:00
Nico Schottelius
9ded11daf0
Merge branch 'type/__postfix' of git://github.com/asteven/cdist
2013-10-10 10:04:44 +09:00
Nico Schottelius
1c7f8baa02
Merge remote-tracking branch 'github/master' into 2.3
2013-10-10 09:55:55 +09:00
Nico Schottelius
49c686319e
add more exapmles to cdist-manifest
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-10 09:51:26 +09:00
Nico Schottelius
9b2d630807
do not install recommends by default
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-10-09 21:47:37 +09:00
Steven Armstrong
5cc894e1e9
only use a single space to distinguish between the actual __target_host and the same used as part of the path; fixes #206
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-10-03 09:55:14 +02:00
Nico Schottelius
ba3819a83e
Merge remote-tracking branch 'github/master'
2013-09-27 23:25:51 +02:00
Steven Armstrong
d166224e68
create tmpfile on same volume as existing file
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-27 22:06:08 +02:00
Steven Armstrong
c769d0b681
preserve ownership and permissions of existing file
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-27 22:05:02 +02:00
Steven Armstrong
8a7639c191
preserve ownership and permissions of existing files
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-27 21:51:36 +02:00
Nico Schottelius
2b66889105
__line: support line/regexp containing /
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-26 16:26:01 +02:00
Steven Armstrong
97a8793fdd
add __postfix* types
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-24 15:54:14 +02:00
Steven Armstrong
4bee421f97
rewrite type to work analog to __file and __link
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-18 13:26:03 +02:00
Nico Schottelius
ee519b878d
Merge remote-tracking branch 'steven/issue/200'
2013-09-18 12:31:39 +02:00
Steven Armstrong
067614db1f
make explorers executable
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-18 11:14:18 +02:00
Steven Armstrong
bba68b6e40
only delete links; delete existing destination before creating links
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-18 10:40:29 +02:00
Steven Armstrong
472198419a
don't assume first argument to be -r, fixes #200
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-12 22:28:29 +02:00
Steven Armstrong
589d50bdba
make --dry-run work, fixes #199
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-12 21:57:22 +02:00
Steven Armstrong
127c512f84
call systemctl in subshell to prevent the explorer from failing if it exits non zero
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-08 22:10:25 +02:00
Nico Schottelius
d0dfe8f834
Merge branch 'feature/default_parameters' of https://github.com/asteven/cdist
2013-09-05 13:44:32 +02:00
Nico Schottelius
98cdc6c139
fix tests so that the explorers are not changed while running tests
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-05 13:02:39 +02:00
Nico Schottelius
33559fad67
add comments to some tests
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-04 23:33:52 +02:00
Steven Armstrong
fc40a40ae0
implement configurable default values for parameters
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-04 22:11:42 +02:00
Steven Armstrong
1927d4852a
add tests for configurable default values for parameters
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-09-04 22:11:08 +02:00
Nico Schottelius
a4151fee44
fix shell from previous context change
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-03 21:32:26 +02:00
Nico Schottelius
5a2873efc8
remove customer types
...
Should not have been committed here - sorry for the noise.
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-03 09:11:12 +02:00
Nico Schottelius
e3f401900a
add the type as well...
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 19:58:11 +02:00
Nico Schottelius
f8d3e36efb
new type: __iptables_apply
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 19:29:11 +02:00
Nico Schottelius
0f6b6f420c
new type: __iptables_rule
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 19:22:53 +02:00
Nico Schottelius
73338c330b
record the type name, if there is no such type
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 11:30:22 +02:00
Nico Schottelius
6cd419b334
have __motd regenerate on Debian/Ubuntu
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 11:26:32 +02:00
Nico Schottelius
6af7eadc89
add --shell to __cdist
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 11:21:19 +02:00
Nico Schottelius
4d8840dba0
also setup homedir
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 10:50:42 +02:00
Nico Schottelius
93f5ace932
clenaup logging in emulator, cleanup emulator in main script
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-09-02 10:49:11 +02:00
Nico Schottelius
760b7e7afb
++changes(2.3.2)
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-30 02:55:22 +02:00
Steven Armstrong
3de9b869ac
there is no such thing as cdist install in master
...
remove all traces of it to prevent the ongoing merge issues when using the real thing
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-08-29 21:56:53 +02:00
Nico Schottelius
2286acc6f2
fix some more tests for the next release
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-28 15:44:52 +02:00
Nico Schottelius
e6feee14fb
Merge branch 'enhance_cache'
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
Conflicts:
cdist/test/code/__init__.py
cdist/test/config_install/__init__.py
cdist/test/explorer/__init__.py
2013-08-28 15:43:03 +02:00
Nico Schottelius
136ddc05b5
context based changes
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-28 15:39:17 +02:00
Nico Schottelius
18c5e60ab1
--context in tests
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-28 15:34:52 +02:00
Nico Schottelius
74e003d29b
+print cdist version on startup + exit_code = 2 for irq
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-21 18:52:35 +02:00
Nico Schottelius
91cf68363b
Merge branch 'issue_191' of https://github.com/asteven/cdist
2013-08-20 00:21:36 +02:00
Steven Armstrong
8aacbe2885
Bourne is not bash
...
see http://shebang.brandonmintern.com/bourne-is-not-bash-or-read-echo-and-backslash/
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-08-19 22:25:17 +02:00
Nico Schottelius
975b93c20a
fix all tests -> back to normal
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 13:37:40 +02:00
Nico Schottelius
b527479620
refactor out_path -> base_path
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 13:35:03 +02:00
Nico Schottelius
866645679a
throw a better exception when environment variables are missing
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 13:34:29 +02:00
Nico Schottelius
2f5de23ae9
out_path -> base_path
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 12:03:25 +02:00
Nico Schottelius
ffeaa3d06b
fix old bug / joining wrong args
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 11:45:43 +02:00
Nico Schottelius
a76d8bb517
:%s/self.out_path/self.base_path/g
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 11:45:22 +02:00
Nico Schottelius
8298bb0bf5
fix test cdist.test.config_install.ConfigInstallRunTestCase
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 11:33:44 +02:00
Nico Schottelius
b3cf339d06
fallback to sys.argv[0] by default
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 11:21:53 +02:00
Nico Schottelius
cd8695d3eb
move create_files_dirs more to up - it is similar to init()
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 08:48:41 +02:00
Nico Schottelius
d1708c78b6
refactoring
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 01:38:28 +02:00
Nico Schottelius
eaf1721212
begin to migrate to '--output-base-path', shrink context
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 00:52:15 +02:00
Nico Schottelius
b9a6cf7c6a
remove context from shell
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 00:38:19 +02:00
Nico Schottelius
a7fe8b4ed2
port context -> remote
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 00:36:25 +02:00
Nico Schottelius
f79727559a
++logs and migrate context -> local
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 00:33:58 +02:00
Nico Schottelius
83c981f477
begin to implement -C --cache-dir
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-19 00:03:57 +02:00
Nico Schottelius
49d9f1f475
support relative paths in -c argument
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-12 12:56:54 +02:00
Nico Schottelius
263a8a73a7
minor cleanups
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-12 12:11:43 +02:00
Nico Schottelius
32f878ad00
update docs, document exit code bug
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-12 11:42:00 +02:00
Nico Schottelius
4e46cf8ce4
begin to document shell changes
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-07 21:12:21 +02:00
Nico Schottelius
79fea569b9
some shell related cleanups
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-07 20:58:45 +02:00
Nico Schottelius
c793825edb
re-arrange REMOTE_COPY/EXEC for Shell use
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-07 17:52:34 +02:00
Nico Schottelius
2403fc59ee
refactor commandline: merge into its own class (and add first shell code)
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-08-07 09:24:10 +02:00
Nico Schottelius
c1441fc676
enhance singleton testing
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-10 17:21:38 +02:00
Nico Schottelius
8ab760ad90
document unit test
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-10 17:02:19 +02:00
Nico Schottelius
b84d3393a0
Merge branch 'remove-singleton-object_id' of https://github.com/asteven/cdist
2013-07-10 16:55:41 +02:00
Steven Armstrong
7205cd5ecf
remove that crappy old singleton object_id thingy
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-07-10 16:31:58 +02:00
Nico Schottelius
ff50a61344
use shortcut version in __package_opkg
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-10 14:16:56 +02:00
Nico Schottelius
dbe65795f5
remove dry_run from object_run
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-05 15:27:34 +02:00
Nico Schottelius
5f318d5de3
print warning in case dry run is activated
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-05 15:12:49 +02:00
Nico Schottelius
5bad25cd6d
add dry_run hint to verbose messages, not debug
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-05 15:02:36 +02:00
Nico Schottelius
3c14f7e2f5
add dry run hint
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-05 15:00:23 +02:00
Nico Schottelius
ab50d8561b
add new type: __cdist
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-07-04 14:34:17 +02:00
Nico Schottelius
9326adf34b
fix refactor error
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-24 13:23:31 +02:00
Nico Schottelius
25bdcb1602
cleanup tests and ... - 100% green
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 22:39:20 +02:00
Nico Schottelius
ef24ec4db8
port test_missing_requirements to config_install unit test
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 21:50:21 +02:00
Nico Schottelius
e1d8645415
fix unit tests for config_install
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 21:48:15 +02:00
Nico Schottelius
4ec1afc47f
also remove obsolete save_cache function
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 16:55:54 +02:00
Nico Schottelius
14a3bf7262
move save_cache into local
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 16:52:56 +02:00
Nico Schottelius
4758daa037
move types into conf/ dir
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 16:38:50 +02:00
Nico Schottelius
347ff8900e
split directory creating code off of init
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-21 16:35:19 +02:00
Nico Schottelius
b1d661f4c0
merge ResolverTestCase and AutorequireTestCase into ExecutionOrderTestCase
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-20 11:30:20 +02:00
Nico Schottelius
b2686f3b13
factor out iterate code to be able to test it for one, two, ... runs
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-20 11:24:47 +02:00
Nico Schottelius
c5c5e7b89b
remove requirement-finder tests - no need to test assignments and no wildcard support anymore
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-20 11:17:30 +02:00
Nico Schottelius
4ae241259f
remove the old entries on change
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-20 09:20:14 +02:00
Nico Schottelius
d78dc7af8b
Merge branch '__cron-simplify'
2013-06-19 21:50:49 +02:00
Nico Schottelius
e7527802a5
more hints for __debconf_set_selections
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 18:53:07 +02:00
Nico Schottelius
622cd398c6
use quiet mode by default
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 18:51:23 +02:00
Nico Schottelius
84f2ca0d1f
add new type: __update_alternatives
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 18:49:43 +02:00
Nico Schottelius
137856002f
Merge branch 'master' into __cron-simplify
2013-06-19 11:31:33 +02:00
Nico Schottelius
4ecffa7d59
fix typo in __process
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 11:31:21 +02:00
Nico Schottelius
fb40ba4d0f
Merge branch 'master' into __cron-simplify
2013-06-19 11:20:25 +02:00
Nico Schottelius
135499f120
__process: make --state optional
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 11:19:45 +02:00
Nico Schottelius
1c94c615b1
__cron: remove parameter changing code, remove multiline code, remove early execution of included $() code, simplify __cron
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 10:55:07 +02:00
Nico Schottelius
1788b343d1
Merge branch '__postgres_role-changes' of https://github.com/nuex/cdist
2013-06-18 13:40:18 +02:00
nuex
90f7ec40fe
__postgres_database: make state parameter optional
2013-06-17 13:49:36 -04:00
nuex
48b6344645
__postgres_role: check if state parameter exists before reading it
2013-06-17 11:16:26 -04:00
nuex
dc39099730
__postgres_role: make state parameter optional, fix password parameter checking in gencode-remote
2013-06-17 11:05:23 -04:00
nuex
211363d5be
__git: quote variables in gencode-remote, add optional parameters in manpage
2013-06-16 01:40:11 -04:00
Nico Schottelius
2acce10497
change __start_on_boot to use systemd on archlinux
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-09 23:45:22 +02:00
Nico Schottelius
68d4bcbcb4
begin to fix syntax errors of merge
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-03 15:05:43 +02:00
Nico Schottelius
3d73cd2fd3
better debugging for wrong type, fix emulator tests, fixes #176
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-27 16:36:20 +02:00
Tyler Akins
1485381340
Fixing apt_ppa type - can't use double equals with dash
2013-05-26 15:54:28 -05:00
Nico Schottelius
51c8687455
re-add object_prepare, use new run() method
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-15 10:08:23 +02:00
Nico Schottelius
ae8040536f
mere tests of autorequire and resolver into execution_order
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-15 09:26:48 +02:00
Nico Schottelius
03bd44e135
Merge branch 'execution_order_plus_general_changes'
2013-05-15 09:19:52 +02:00
Nico Schottelius
a9ffa86b74
remove some old code, merge run into deploy_and_cleanup
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-15 09:19:36 +02:00
Nico Schottelius
72fef03184
Merge branch 'execution_order' into execution_order_plus_general_changes
2013-05-15 09:16:59 +02:00
Nico Schottelius
0b4914a7f3
+comment wording
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-15 09:16:52 +02:00
Nico Schottelius
e771e91043
Merge branch '__ssh_authorized_keys' of https://github.com/asteven/cdist
2013-05-10 13:13:13 +02:00
Steven Armstrong
d4bad031e9
bugfix: the parameter is named 'state' not 'present'
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-05-10 12:41:56 +02:00
Steven Armstrong
d72afd3903
dont change parameters; dont use tmpfile; update copyright
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-05-10 12:35:22 +02:00
Nico Schottelius
a265d87037
begin dry run in command line
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-05-02 16:41:16 +02:00
Nico Schottelius
f95052e56f
remove unused modules
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 15:18:03 +02:00
Nico Schottelius
4882c2cf19
--resolver in config_install
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 15:16:38 +02:00
Nico Schottelius
956f400da6
re-arrange for future cleanup
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 15:15:22 +02:00
Nico Schottelius
2dac681f25
better error message
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 15:07:59 +02:00
Nico Schottelius
85d24ce259
fix execution order - seems to be fine now
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 15:07:27 +02:00
Nico Schottelius
8a7c64f86a
cleanups + indent errors
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 11:04:01 +02:00
Nico Schottelius
a064cc19b3
try new object orientated (hrrr) code instead of stage based
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-30 10:58:23 +02:00
Nico Schottelius
002537f5d1
Merge pull request #169 from arkaitzj/global_explorers
...
Make global explorers available to initial manifest
2013-04-09 06:11:07 -07:00
Nico Schottelius
af75aa9024
use chmod to allow chmod being in a different path
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-08 19:58:22 +02:00
Arkaitz Jimenez
9dcad37acf
Remove the umask requirement, set the proper permissions to base_path
2013-04-08 19:58:21 +02:00
Nico Schottelius
5152bdfce7
add hint for 0700, root:root behaviour of __directory --parents
...
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-04-03 16:49:03 +02:00
Nico Schottelius
352c7da46c
quote the new value check - may contains spaces
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-04-02 09:21:01 +02:00
Nico Schottelius
dd566527a9
Merge branch 'user_create_home' of https://github.com/arkaitzj/cdist
2013-04-02 09:19:58 +02:00
Arkaitz Jimenez
4a89e64115
Make global explorers available to initial manifest and fix hostname explorer
2013-04-01 00:48:57 +02:00
Arkaitz Jimenez
60f85c5b85
__user support for --create-home
2013-04-01 00:02:22 +02:00
Arkaitz Jimenez
d59953642e
crontab -l should be allowed to fail with "no crontab" without stopping exec
2013-04-01 00:01:22 +02:00
Nico Schottelius
44a0f5d7bb
restore resolver test
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-02-22 11:13:44 +01:00
Nico Schottelius
a59fa92246
Merge remote-tracking branch 'jake/__directory_fix'
2013-02-21 22:25:18 +01:00
Jake Guffey
a1fb621d19
Merge branch 'master' into __directory_fix
2013-02-20 08:19:46 -05:00
Jake Guffey
a50830dca8
Use $__explorer to get os type
2013-02-19 16:31:06 -05:00
Jake Guffey
9f330e361d
Added support for multiple IP addresses
...
FreeBSD jails support jail_${name}_ip="iface1|addr1, iface2|addr2" format for specifying multiple IP addresses
2013-02-19 16:24:22 -05:00
Jake Guffey
52fdf15a4b
Add umask
...
Some directories were being created 700 and causing problems, added umask 022 to fix this
2013-02-19 15:28:03 -05:00
Jake Guffey
005c94556e
Fix to support FreeBSD's stat(1)
...
Added check for OS type
Added FreeBSD syntax in case of $os=freebsd
2013-02-19 15:23:52 -05:00
Nico Schottelius
177c350747
use self.context, not self.local
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-02-14 15:45:58 +01:00
Nico Schottelius
d1e06504a2
merge back the dependency resolver into pseudo master
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-02-14 15:28:40 +01:00
Steven Armstrong
06fb7491fa
prevent requirements from leaking into autorequired objects and creating circular references
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
Conflicts:
cdist/test/autorequire/__init__.py
2013-02-14 15:23:04 +01:00
Nico Schottelius
cb829ec8d0
introduce MissingObjectIdError
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-02-05 22:50:22 +01:00
Nico Schottelius
3b430c0d76
Merge pull request #156 from contradict/__git_permissions
...
__git respects --owner and --group, add --mode
2013-01-31 13:06:09 -08:00
Nico Schottelius
c620c2fa29
Merge pull request #155 from statianzo/directory-owner
...
Set permissions on existing directory
2013-01-31 13:05:10 -08:00
b772e09d53
Exit with no error if directory absent
...
Explorers need to handle the case of no directory.
2013-01-30 00:48:08 -08:00
Jason Staten
919707d6f9
Initialize variables to empty string
...
Set mode, group, etc. to an empty string to ensure that no external
environment variables can leak in.
2013-01-28 10:06:04 -07:00
Eivind Uggedal
1b25ef33b9
Slackware os and os_version explorer support.
2013-01-28 08:30:54 -05:00
3ff7621984
__git respects --owner and --group, add --mode
...
After checkout, chown and chmod as specified. If already present, but
not possessing correct permissions, run chown and chmod as needed.
2013-01-27 19:53:22 -08:00
Jason Staten
fc1a9ed27b
directory permission explorers
...
The group, mode, and owner are now pulled from a explorers. If the
desired value matches the existing value, then no code is executed.
If the recursive flag is set, the permissions are applied every run.
2013-01-24 22:37:52 -07:00
Nico Schottelius
1d933dd5d3
do not need to create directories - git will do this - thanks to Steven
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-01-20 22:02:10 +01:00
Nico Schottelius
7a41d6d8fa
__file: notify when doing changes
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2013-01-20 18:11:47 +01:00
Jason Staten
f16ac1911d
Set permissions on existing directory
...
Previously, an existing directory would not have its permissions
modified by the __directory type. This change removes exiting early when
$state_is matches $state_should
2013-01-16 20:46:23 -07:00
f41b029ade
Eliminiate excess output from machine explorer
...
command -v emits a string to stdout, silence this since we are only
interested in the return code.
2013-01-12 19:35:09 -08:00
Nico Schottelius
e03f5d08dd
move / correct tests in object and config_install
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 21:14:23 +01:00
Nico Schottelius
ef45cd5ce0
fix removal of context alias in config_install
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 21:14:07 +01:00
Nico Schottelius
2732a4ba5c
finally finish the dynamic resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 21:10:18 +01:00
Nico Schottelius
527ec0889b
remove unneeded fixtures
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 20:53:38 +01:00
Nico Schottelius
4fd27e76a7
support dry_run in stage_run_iterate as well
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 19:37:43 +01:00
Nico Schottelius
c270538072
add dry_run option to object_run
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 19:36:00 +01:00
Nico Schottelius
eb93d1bebd
begin tests for config_install
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 15:33:50 +01:00
Nico Schottelius
369305f376
remove circularreferenceerror, because it is not being used anymore
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-19 15:33:41 +01:00
Nico Schottelius
8031c77700
fix some tests, break some others :-)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-18 18:21:51 +01:00
Nico Schottelius
4faec43493
cleanup: remove call to old resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-18 17:37:07 +01:00
Nico Schottelius
958d2d336f
various cleanups
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-18 17:16:26 +01:00
Nico Schottelius
442dc767dd
merge resolver test into object test - because object requirement solving is implemented
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-16 12:55:36 +01:00
Nico Schottelius
cd8b3cf68d
finish rewrite of dependency resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-16 12:47:13 +01:00
Nico Schottelius
6a8778e595
remove most of the resolver boilerplate, keep the interesting functions
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-14 08:43:52 +01:00
Nico Schottelius
81c92e5cc4
merge all resolver code into cdist_object (to gain the requirement searching code
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-14 08:41:56 +01:00
Nico Schottelius
16340b7d34
report on broken requirements, begin to satisfy requirements
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-14 08:41:17 +01:00
Nico Schottelius
6b6037d9bb
todos for a simple resolver
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-13 06:44:55 +01:00
Nico Schottelius
2e81379c18
add very simple solver for dependencies
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-13 06:41:33 +01:00
Jake Guffey
7d7ad2630c
Fix issue #147
...
--state absent should imply --stopped.
2012-12-11 11:15:21 -05:00
Nico Schottelius
67c7351bec
install the right package, not pyro...
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-09 11:49:26 -08:00
Nico Schottelius
3167ececc6
add owner/group support to __git
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-05 23:16:03 +01:00
Nico Schottelius
8b91e3116a
create working version of __git
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-12-05 23:07:21 +01:00
Nico Schottelius
5a3dc38e60
Merge branch 'master' into type__git
2012-12-05 22:46:07 +01:00
Steven Armstrong
56b6c95ed4
implement conf-dir from CDIST_PATH environment variable
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-30 16:46:17 +01:00
Nico Schottelius
f37f3d201c
__ssh_authorized_key has been superseeded by __ssh_authorized_keys
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-30 14:41:47 +01:00
Steven Armstrong
1ef5bcaa74
new type: __ssh_authorized_keys - manage ssh authorized_keys files
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-30 11:59:38 +01:00
Steven Armstrong
3a419ed58b
make type explorers executable after transfering them
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-30 10:31:15 +01:00
Nico Schottelius
868421bf16
Update examples to match new parameters
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-30 10:01:37 +01:00
Nico Schottelius
1bd27fffae
__jail: started -> stopped, correct help output
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-27 10:57:10 +01:00
Nico Schottelius
fd8fdf8b54
Merge branch 'master' into type__jail_boolean
2012-11-27 08:58:14 +01:00
Nico Schottelius
8bf196fdc0
add helpful log message when resolving dependencies
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-20 22:41:38 +01:00
Nico Schottelius
b996dcbae1
bugfix __qemu_img
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 17:42:39 +01:00
Nico Schottelius
8408f433e9
remove type from here - goes into cdist-nico repo
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 17:27:35 +01:00
Nico Schottelius
a6452cfabd
rename type to reflect new environment
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 17:24:38 +01:00
Nico Schottelius
3dfad32d4c
add new type: __localch_kvm_vm
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 17:24:01 +01:00
Nico Schottelius
2fe647a1f7
Revert "implement before/after to declare dependencies and deprecate require"
...
Comment from asteven:
Some problems showed up while updating the docs and tests.
You should revert the merge for now.
This reverts commit 84770b9ef2
.
2012-11-19 15:17:46 +01:00
Nico Schottelius
d4fc49fa6b
begin manpage
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 15:13:57 +01:00
Nico Schottelius
d419722a24
adapt documentation to use boolean parameter as well
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 13:43:45 +01:00
Nico Schottelius
bb19902581
Merge branch 'master' into type__jail_boolean
2012-11-19 13:40:59 +01:00
Nico Schottelius
4718b81a08
Documentation cleanup (old pre-boolean variant)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 13:40:35 +01:00
Nico Schottelius
67545eda79
Merge remote-tracking branch 'steven/issue_140'
2012-11-19 13:35:21 +01:00
Nico Schottelius
4ab51df2c8
Merge pull request #139 from asteven/2.1_before-after
...
implement before/after to declare dependencies and deprecate require
2012-11-19 04:27:09 -08:00
Nico Schottelius
4e3bab81d5
Merge pull request #138 from asteven/issue_138
...
file from stdin is broken
2012-11-19 04:17:43 -08:00
Steven Armstrong
7f0ae7928a
fix state explorer to properly detect already existing ppa
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-19 13:05:23 +01:00
Steven Armstrong
84770b9ef2
implement before/after to declare dependencies and deprecate require
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
--whitespace
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-19 12:29:49 +01:00
Steven Armstrong
6d430524f1
binary all the way, fixes issue #138
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-19 12:04:07 +01:00
Nico Schottelius
13968d16f6
change __jail to boolean, fixes #128
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-19 10:36:52 +01:00
Nico Schottelius
327a0f2844
remove --groups from __user type
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-18 23:31:19 +01:00
Steven Armstrong
b0ac5fe78d
update __jail type to match changed signature of __directory: fixes #135
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-16 21:18:08 +01:00
Nico Schottelius
9c5926f697
Merge branch '__user_groups' of https://github.com/asteven/cdist
2012-11-16 15:58:57 +01:00
Nico Schottelius
500c194328
Merge branch 'issue_126' of https://github.com/asteven/cdist
2012-11-16 15:34:58 +01:00
Steven Armstrong
28e8632097
new type: __user_group: manage user groups
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-16 15:31:33 +01:00
Steven Armstrong
6c685e61d5
fixes #126
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-16 15:27:32 +01:00
Steven Armstrong
e4910933b1
__apt_ppa: /enabled/present/ -e /disabled/absent/
...
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2012-11-16 14:56:20 +01:00
Nico Schottelius
e6bf226036
convert __rvm_gmeset to boolean parameter
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 17:47:06 +01:00
Nico Schottelius
18dd0ebd33
ensure global and type explorers are executable on the remote side
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 17:37:15 +01:00
Nico Schottelius
80c6592ec8
add hints to related manpages
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 09:49:37 +01:00
Nico Schottelius
2fca87eda8
++comment
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 09:34:19 +01:00
Nico Schottelius
a498330bd3
remove _read_stdin and open stdin file in non-binary mode
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-15 09:32:44 +01:00
Nico Schottelius
482ec3c5d8
make --default boolean in type __rvm_ruby
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 19:27:17 +01:00
Nico Schottelius
3d4bb3837f
documentation cleanups
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 19:22:02 +01:00
Nico Schottelius
0eda57986f
remove parameter changing code in __key_value (fixes #114,#36)
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 18:28:58 +01:00
Nico Schottelius
344e08ddda
Archive __autofs types ( fixes #116 )
...
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-11-07 18:22:25 +01:00