-
Notifications
You must be signed in to change notification settings - Fork 67
cf-sketch interactive mode does not work with multi-dimensional arrays #240
Comments
We plan to approach this in two ways:
|
But I WANT to use deeply nested arrays, it builds character ;) |
@zzamboni is working on it. |
Interactive configuration mode has now been reimplemented for the new cf-sketch. Please see and test #309. It still doesn't work with deeply-nested arrays though, since the drive seems to be towards simplification of parameters. I think for complex data structures you are better off editing the JSON file directly anyway. |
yes i got the same issue while configure Users::Local on interactive mode it is very had to set the value and it is not set throw the error. |
I still think interactive parameter entry is not well suited for complex data structures, it's simply too error prone. The best would be to automatically put the user in an $EDITOR session with the JSON file preloaded, so they can edit the values. Upon exit, validate and if there are any errors, go back to the editor. |
I disagree from an ease of use standpoint. Answering questions or a menu
|
@zzamboni : but that array things works with Security::SSH modules how ? that is my questations. see info of Security::SSH but but but it cant work for Security::security_limits & Users::Local |
@shreyu82 the parameter types are different. In Security::SSH is a plain array of key/value pairs, whereas in Users::Local it's a list of arrays, and in Security::security_limits it's a nested array. |
@zzamboni but how to pass that nested array using interactive mode using cf-sketch cause i am using that mode only . so any video avaialable to pass or any method ? currently i impret them using .json file . |
Users::Local it's a list of arrays, and in Security::security_limits it's a nested array. how to pass on non-interactive mode ? i passed using as mentioned below cf-sketch> define params Users::Local This sketch has multiple accessible bundles. Parameter set oracle successfully defined. I attached jpg file too " users[oracle]: { 'Oracle user", 1001, 1002, /home/oracle, /bin/bash, 'test'} " |
As I said before, interactive mode in cf-sketch does not support complex data types. You need to store the parameters in a JSON file and load it by passing it as a second argument to the "define params" command, for example: define params Users::Local /path/to/params.json Most sketches include sample JSON parameter files under their params/ directory (for example, design-center/sketches/system/users_local/params/demo.json) --Diego On Dec 24, 2013, at 3:54 AM, shreyu82 [email protected] wrote:
|
Okay thanks zzamboni. i also used it like below from non-interactive /usr/local/bin/cf-sketch --expert --installsource=/var/cfengine/design-center/sketches/system/users_local/params/demo.json --cfpath=/var/cfengine/bin --test --activated --force --standalone --install CFEngine::stdlib --deactivate-all --generate -v --force --standalonerunfile /var/cfengine/inputs/standalone-cf-sketch-runfile.cf --install Utilities::abortclasses --activate Utilities::abortclasses=/var/cfengine/design-center/sketches/utilities/abortclasses/params/test_alert_only.json Okay got you thanks zzamboni |
Glad you got it working! --Diego On Jan 1, 2014, at 2:12 AM, shreyu82 [email protected] wrote:
|
Yeah zzamboni but I am still try to find solution for how to pass variable value using nested arrays with interactive mode. ;-) |
@zzamboni any idea why default lib : "manage_variable_values_ini" function not work well in CF3 .it return error while change value in php.ini |
@zzamboni any idea how do i call folder in sketch.json under manifest block |
any idea how it ? |
Hi @shreyu82 The manifest currently does not support directories as an install target. For what you describe, you really want to do the copying to the final destination in the sketch itself. |
Removed "machines" from Host. Minor markdown cleanup.
Try configuring Repository::apt::Maintain
The text was updated successfully, but these errors were encountered: