Merge branch '3.0' into 4.0-pre-not-stable

This commit is contained in:
Nico Schottelius 2014-02-14 20:52:36 +01:00
commit 2734e5069e
33 changed files with 43 additions and 20 deletions

View file

@ -26,6 +26,7 @@ state::
branch:: branch::
Create this branch by checking out the remote branch of this name Create this branch by checking out the remote branch of this name
Default branch is "master"
group:: group::
Group to chgrp to. Group to chgrp to.

View file

@ -16,7 +16,7 @@ This type is used on FreeBSD to manage jails.
REQUIRED PARAMETERS REQUIRED PARAMETERS
------------------- -------------------
state:: state::
Either "present" or "absent." Either "present" or "absent", defaults to "present".
jailbase:: jailbase::
The location of the .tgz archive containing the base fs for your jails. The location of the .tgz archive containing the base fs for your jails.

View file

@ -0,0 +1 @@
present

View file

@ -5,3 +5,4 @@ interface
devfs-ruleset devfs-ruleset
jaildir jaildir
jailbase jailbase
state

View file

@ -16,7 +16,7 @@ This type is used on *BSD systems to manage the pf firewall's ruleset.
REQUIRED PARAMETERS REQUIRED PARAMETERS
------------------- -------------------
state:: state::
Either "absent" (no ruleset at all) or "present" Either "absent" (no ruleset at all) or "present", defaults to "present".
OPTIONAL PARAMETERS OPTIONAL PARAMETERS

View file

@ -0,0 +1 @@
present

View file

@ -1 +1,2 @@
source source
state

View file

@ -19,8 +19,7 @@
# #
name="$__object_id" name="$__object_id"
state_should="present" state_should="$(cat "$__object/parameter/state")"
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
state_is="$(cat "$__object/explorer/state")" state_is="$(cat "$__object/explorer/state")"
if [ "$state_should" != "$state_is" ]; then if [ "$state_should" != "$state_is" ]; then

View file

@ -16,7 +16,7 @@ This cdist type allows you to create or drop postgres databases.
OPTIONAL PARAMETERS OPTIONAL PARAMETERS
------------------- -------------------
state:: state::
either 'present' or 'absent' either 'present' or 'absent', defaults to 'present'.
owner:: owner::
the role owning this database the role owning this database

View file

@ -0,0 +1 @@
present

View file

@ -20,8 +20,7 @@
name="$__object_id" name="$__object_id"
state_is="$(cat "$__object/explorer/state")" state_is="$(cat "$__object/explorer/state")"
state_should="present" state_should="$(cat "$__object/parameter/state")"
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
[ "$state_is" = "$state_should" ] && exit 0 [ "$state_is" = "$state_should" ] && exit 0

View file

@ -0,0 +1 @@
present

View file

@ -16,7 +16,7 @@ RVM is the Ruby enVironment Manager for the Ruby programming language.
REQUIRED PARAMETERS REQUIRED PARAMETERS
------------------- -------------------
state:: state::
Either "present" or "absent". Either "present" or "absent", defaults to "present".
EXAMPLES EXAMPLES

View file

@ -0,0 +1 @@
present

View file

@ -20,7 +20,7 @@ user::
gemset:: gemset::
The gemset to use The gemset to use
state:: state::
Either "present" or "absent" Either "present" or "absent", defaults to "present".
OPTIONAL PARAMETERS OPTIONAL PARAMETERS
------------------- -------------------

View file

@ -0,0 +1 @@
present

View file

@ -1 +1,2 @@
default default
state

View file

@ -1,3 +1,2 @@
state
gemset gemset
user user

View file

@ -18,7 +18,7 @@ REQUIRED PARAMETERS
user:: user::
The remote user account to use The remote user account to use
state:: state::
Either "present" or "absent". Either "present" or "absent", defaults to "present".
BOOLEAN PARAMETERS BOOLEAN PARAMETERS
------------------- -------------------

View file

@ -0,0 +1 @@
present

View file

@ -1,2 +1 @@
state
user user

View file

@ -18,7 +18,7 @@ REQUIRED PARAMETERS
user:: user::
The remote user account to use The remote user account to use
state:: state::
Either "present" or "absent". Either "present" or "absent", defaults to "present".
BOOLEAN PARAMETERS BOOLEAN PARAMETERS
------------------ ------------------

View file

@ -0,0 +1 @@
present

View file

@ -1,2 +1 @@
state
user user

View file

@ -189,7 +189,8 @@ class Emulator(object):
def record_requirements(self): def record_requirements(self):
"""record requirements""" """record requirements"""
if "CDIST_ORDER_DEPENDENCY" in self.env: # Inject the predecessor, but not if its an override (this would leed to an circular dependency)
if "CDIST_ORDER_DEPENDENCY" in self.env and not 'CDIST_OVERRIDE' in self.env:
# load object name created bevor this one from typeorder file ... # load object name created bevor this one from typeorder file ...
with open(self.typeorder_path, 'r') as typecreationfile: with open(self.typeorder_path, 'r') as typecreationfile:
typecreationorder = typecreationfile.readlines() typecreationorder = typecreationfile.readlines()

View file

@ -49,7 +49,7 @@ class ObjectClassTestCase(test.CdistTestCase):
self.expected_objects = [] self.expected_objects = []
for cdist_object_name in self.expected_object_names: for cdist_object_name in self.expected_object_names:
cdist_type, cdist_object_id = cdist_object_name.split("/", maxsplit=1) cdist_type, cdist_object_id = cdist_object_name.split("/", 1)
cdist_object = core.CdistObject(core.CdistType(type_base_path, cdist_type), object_base_path, cdist_object_id) cdist_object = core.CdistObject(core.CdistType(type_base_path, cdist_type), object_base_path, cdist_object_id)
self.expected_objects.append(cdist_object) self.expected_objects.append(cdist_object)

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# 2012-2013 Nico Schottelius (nico-cdist schottelius.org) # 2012-2013 Nico Schottelius (nico-cdist schottelius.org)
# 2013 Steven Armstrong (steven-cdist armstrong.cc) # 2013-2014 Steven Armstrong (steven-cdist armstrong.cc)
# #
# This file is part of cdist. # This file is part of cdist.
# #
@ -20,4 +20,4 @@
# #
code="$(echo "$@" | sed "s|\([[:space:]]\)$__target_host:|\1|g")" code="$(echo "$@" | sed "s|\([[:space:]]\)$__target_host:|\1|g")"
cp --dereference $code cp -L $code

View file

@ -9,8 +9,19 @@ Changelog
* Core: Integrate initial preos support * Core: Integrate initial preos support
3.0.9: 3.0.9: 2014-02-14
* Core: Ignore order dependencies if override is set (Daniel Heule)
* Core: Improve Mac OS X support for unit tests (Steven Armstrong)
* Type __locale: Error out in case of unsupported OS * Type __locale: Error out in case of unsupported OS
* Type __jail: Use default parameters for state (Daniel Heule)
* Type __pf_ruleset: Use default parameters for state (Daniel Heule)
* Type __postgres_database: Use default parameters for state (Daniel Heule)
* Type __postgres_role: Use default parameters for state (Daniel Heule)
* Type __rvm: Use default parameters for state (Daniel Heule)
* Type __rvm_gem: Use default parameters for state (Daniel Heule)
* Type __rvm_gemset: Use default parameters for state (Daniel Heule)
* Type __rvm_ruby: Use default parameters for state (Daniel Heule)
3.0.8: 2014-02-11 3.0.8: 2014-02-11
* Core: Enhance object id verification (Daniel Heule) * Core: Enhance object id verification (Daniel Heule)

View file

@ -236,7 +236,7 @@ The following environment variables influence the behaviour of cdist:
require:: require::
Setup dependencies between objects (see cdist-manifest(7)) Setup dependencies between objects (see cdist-manifest(7))
CDIST_ALLOW_OVERRIDE:: CDIST_OVERRIDE::
Allow overwriting type parameters (see cdist-manifest(7)) Allow overwriting type parameters (see cdist-manifest(7))
CDIST_ORDER_DEPENDENCY:: CDIST_ORDER_DEPENDENCY::

View file

@ -152,6 +152,10 @@ ATTENTION: Only use this feature if you are 100% sure in which order
cdist encounter the affected objects, otherwhise this results cdist encounter the affected objects, otherwhise this results
into an undefined situation. into an undefined situation.
If CDIST_OVERRIDE and CDIST_ORDER_DEPENDENCY is set for an object,
CDIST_ORDER_DEPENDENCY will be ignored, because adding a dependency in case of
overrides would result in circular dependencies, which is an error.
THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED AT ANY TIME. THIS IS A BETA FEATURE AND MAY BE REMOVED OR CHANGED AT ANY TIME.