use Cfengine to clone server configuration

2011-11-30 Thread Carl E. Ma
Hello All,  I am new to Cfengine3. Is it possible to use cfengine to clone one server's configuration to another server? My intention is using cfengine to deploy system/application configuration change on VM host. If this host crashed or destroyed, we can quickly bring another VM and apply  th

CFEngine Help: Re: Error creating a directory (use forcedirs=true)

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: Error creating a directory (use forcedirs=true) Author: bmarsh Link to topic: https://cfengine.com/forum/read.php?3,24130,24133#msg-24133 @David - thanks, I got it to work with: "/home/rsync/" perms => mog("700","rsync","rsync"), comment => "Make rsync

CFEngine Help: Re: An advanced policy using template and variable substitution

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: An advanced policy using template and variable substitution Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24105,24132#msg-24132 My suggestion in the first post would also keep the comments, but after all this approach is unnecessary because

CFEngine Help: Re: Error creating a directory (use forcedirs=true)

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: Error creating a directory (use forcedirs=true) Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,24130,24131#msg-24131 See ref. manual 7.4.4 (headed "create"). For a file, specify "/path/to/file" for a directory: "/path/to/dir/." Note

CFEngine Help: Error creating a directory (use forcedirs=true)

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Error creating a directory (use forcedirs=true) Author: bmarsh Link to topic: https://cfengine.com/forum/read.php?3,24130,24130#msg-24130 I was attempting to create a homedir and then a .ssh direcctory, but I goofed up and made a file instead of a directory. files:

CFEngine Help: Re: CFEngine Help: convert class name into a string

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: CFEngine Help: convert class name into a string Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,24126,24129#msg-24129 You have a point. I'll have to think about this a little longer. ___ Help-c

CFEngine Help: Re: convert class name into a string

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: convert class name into a string Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,24123,24128#msg-24128 Does this help you? body common control { bundlesequence => { "main", }; } bundle agent main { var

Re: CFEngine Help: Re: arrays without brackets?

2011-11-30 Thread Nicolas Charles
/me has a revelation ! Thank you Diego ! On 30/11/2011 16:09, no-re...@cfengine.com wrote: > Forum: CFEngine Help > Subject: Re: arrays without brackets? > Author: zzamboni > Link to topic: https://cfengine.com/forum/read.php?3,24118,24121#msg-24121 > > I think you may have seen the post on email

CFEngine Help: Re: arrays without brackets?

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: arrays without brackets? Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,24118,24125#msg-24125 Oops! Yes, Diego, that's it. Thank you. My apologies for the noise. ___ Help-cfengine mailing list

CFEngine Help: Re: convert class name into a string

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: convert class name into a string Author: msvob...@linkedin.com Link to topic: https://cfengine.com/forum/read.php?3,24123,24124#msg-24124 Heh. Good question. I go the other way around and can define classes based off of strings like this vars:

Re: CFEngine Help: convert class name into a string

2011-11-30 Thread Nicolas Charles
Hi Neil, I'm afraid I don't really understand what you would like to have... how would you define which variables would contains which classname, and save a significant amount of characters to be better than the solution you suggested ? Regards Nicolas On 30/11/2011 16:40, no-re...@cfengine.c

CFEngine Help: convert class name into a string

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: convert class name into a string Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,24123,24123#msg-24123 How could I convert a class name into a string without manual typing. E.g. vars: myclass:: "mystring" string =>

CFEngine Help: Re: Improving community open promise-body library (COPBL)

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: Improving community open promise-body library (COPBL) Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,24119,24122#msg-24122 Todd, thanks for the contribution. I'm in the process of adding some additional bodies/bundles to COPBL, I'll probabl

CFEngine Help: Re: arrays without brackets?

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: arrays without brackets? Author: zzamboni Link to topic: https://cfengine.com/forum/read.php?3,24118,24121#msg-24121 I think you may have seen the post on email rather than on the forum - the forum software has a bug that strips things in brackets. Look at that p

CFEngine Help: Re: An advanced policy using template and variable substitution

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: An advanced policy using template and variable substitution Author: msvob...@linkedin.com Link to topic: https://cfengine.com/forum/read.php?3,24105,24120#msg-24120 Hey Toddnni Using the MD5 sum copy from /etc/sysctl.final into /etc/sysctl.conf allows me to keep

CFEngine Help: Improving community open promise-body library (COPBL)

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Improving community open promise-body library (COPBL) Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24119,24119#msg-24119 Dear community, I would like to share you some bodys that I miss from cfengine_stdlib.cf. I think that most of us have cr

CFEngine Help: arrays without brackets?

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: arrays without brackets? Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,24118,24118#msg-24118 I suspect I'm overlooking something in the documentation. If so, please point me in the right direction. My understanding of arrays is based on the

CFEngine Help: Re: multiple command sequences as a variable

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: multiple command sequences as a variable Author: phnakarin Link to topic: https://cfengine.com/forum/read.php?3,24113,24117#msg-24117 You should use 'useshell' to your command promise too. aix: "sshd_restart" string => "/usr/bin/stopsrc -s sshd; /usr/bin/st

CFEngine Help: Re: multiple command sequences as a variable

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: multiple command sequences as a variable Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24113,24116#msg-24116 Hi, shell is not enabled by default in command promises. Use contain => in_shell, which enables useshell => "true". Then something

CFEngine Help: Re: An advanced policy using template and variable substitution

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: An advanced policy using template and variable substitution Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24105,24115#msg-24115 After thinking a while, I don't see a reason to use intermediate "/etc/sysctl.final" file, because you are using

CFEngine Help: multiple command sequences as a variable

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: multiple command sequences as a variable Author: xwangbu Link to topic: https://cfengine.com/forum/read.php?3,24113,24113#msg-24113 how to define multiple commands as a variable? i'm trying to compress a bundle so that it works for Red Hat and AIX systems. the var en

CFEngine Help: Re: downsizing a huge policy file, sensibly

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: downsizing a huge policy file, sensibly Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,24050,24114#msg-24114 Marco: Basically, as Todd says. (Thanks, Todd!). Below is a variant of the last box in my earlier reply, but simplifying the cal

CFEngine Help: Re: An advanced policy using template and variable substitution

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: An advanced policy using template and variable substitution Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24105,24111#msg-24111 Mike, that is nice, but have you tried to use delete_lines:: to delete all unnecessary lines from the file? I t

Re: CFEngine Help: An advanced policy using template and variable substitution

2011-11-30 Thread Marco Marongiu
Il 30/11/2011 09:14, Bas van der Vlies ha scritto: > PS) I still need to go to the web interface to read this message. Is > there a fix. So i can read posts with arrays with an email program? +1, very, very annoying (and I'd burn *all* the forums that require me to visit them periodically to see

Re: CFEngine Help: An advanced policy using template and variable substitution

2011-11-30 Thread Bas van der Vlies
Indeed very nice. PS) I still need to go to the web interface to read this message. Is there a fix. So i can read posts with arrays with an email program? -- * Bas van der Vliese-mail: b...@sara.nl

CFEngine Help: Re: On persistent classes

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: On persistent classes Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24095,24109#msg-24109 To my understanding this is the only way currently. However this proposition https://cfengine.com/bugtracker/view.php?id=875 seems interesting. _

CFEngine Help: Re: downsizing a huge policy file, sensibly

2011-11-30 Thread no-reply
Forum: CFEngine Help Subject: Re: downsizing a huge policy file, sensibly Author: toddnni Link to topic: https://cfengine.com/forum/read.php?3,24050,24108#msg-24108 Hi marco, to pass a list you need to use list's full qualified name ntp("@(bundle_where_var_is_defined.ntpconf)") or ntp("@(this.nt