reports: "Not sure I understand" LastSeen

2010-12-22 Thread Nick Anderson
a successful policy update. There might be situations where fencing off a host no longer getting policy updates would be beneficial (removing from pools, and fire-walling off services on the host that may be providing suspect content come to mind)

Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-22 Thread Nick Anderson
ice to have my /etc/motd updated with the time of the last successful policy update. (this will not work on a bootstrap as the motd template is not available to expand) Criticisms welcome. -- Nick Anderson # # Failsafe file # body common control{ bundlesequence =&g

Re: Cfengine Help: Re: Extended solutions guide and YOUR HELP!

2010-12-22 Thread Nick Anderson
ithub.com/nickanderson/CFengine3-Style-Guide -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-22 Thread Nick Anderson
al. So that I could add host specific notes if wanted. But not quite sure how to do that yet. -- Nick Anderson # # This server is managed by CFengine, any manual edits may be reverted. # CFengine policy last updated: $(sys.date). # ___ Help-cfengine m

Re: Cfengine Help: Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-23 Thread Nick Anderson
This forces update then run so that the latest policy will be evaluated. I have attached my latest failsafe.cf for your enjoyment, please excuse any mess in it if I havent cleaned up some of the syntax. -- Nick Anderson # Copyright (C) Cfengine AS # This file is part of Cfengine 3 - written and main

Re: Cfengine Help: Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-23 Thread Nick Anderson
issue here is the client does not have the servers key and cannot trust the server. I cant quite reconcile in my head the key exchange, or the best way to manage the key exchange. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Cfengine Help: Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-23 Thread Nick Anderson
mises.cf !!! System error for stat: "No such file or directory" Can't stat file "/var/cfengine/inputs/promises.cf" for parsing !!! System error for stat: "No such file or directory" -- Nick Anderson ___ Help-cfen

Re: Cfengine Help: Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-23 Thread Nick Anderson
e or two servers every so often. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Cfengine Help: Re: Cfengine Help: How to configure a client machine to contact the policy server and downloads updates?

2010-12-24 Thread Nick Anderson
eiving mis-matches are a different story. So I suppose it makes sense to just trust on initial connection, it will error if there is ever a miss-match. That brings up the question how can I instruct SSH to automatically save a host fingerprint on initial connection. -- Nick Anderson __

Re: Cfengine Help: best practices for manipulating strings

2010-12-27 Thread Nick Anderson
On Mon, Dec 27, 2010 at 11:46:48PM +0100, no-re...@cfengine.com wrote: > I'm trying to create an agent that creates seed forward and reverse zone > files for bind9. I'd like to specify the static addresses in both files: > forward: > myhost.acme.com. IN A 192.168.1.254 > reverse: > 254.1.168.192.

Re: Cfengine Help: Re: generating a list of all your current servers using Cfengine

2010-12-29 Thread Nick Anderson
On Wed, Dec 29, 2010 at 08:42:46PM +0100, Nicolas Charles wrote: > And of course, if you have several policy servers, generate the lastseen > report on each of them > Then you can run the command using cf-runagent Run the command? Won't cf-runagent just force a cf-agent run? I haven't been succes

Re: Cfengine Help: New features of Cfengine 3.1.2

2010-12-29 Thread Nick Anderson
On Wed, Dec 29, 2010 at 11:17:04PM +0100, no-re...@cfengine.com wrote: > Also, on a new release of Cfengine you are probably wondering if you should > put effort into upgrading. > Therefore, I decided to write a small article on the new and cool features of > Cfengine 3.1.2 and how to take advant

Re: Cfengine Help: New features of Cfengine 3.1.2

2010-12-30 Thread Nick Anderson
On Wed, Dec 29, 2010 at 11:17:04PM +0100, no-re...@cfengine.com wrote: > Therefore, I decided to write a small article on the new and cool features of > Cfengine 3.1.2 and how to take advantage of them (if this is not automatic). > Please feel free to comment on the usefulness of it, to make my d

Re: generating a list of all your current servers using Cfengine

2010-12-30 Thread Nick Anderson
On Thu, Dec 30, 2010 at 10:42:59PM +0100, Erlend Leganger wrote: > I have a simple setup where all servers (<30) are on the same LAN. The > policies include heartbeat promise which always evaluates to true, this > promise runs a heartbeat script which updates a data file per server on a > common NF

Re: generating a list of all your current servers using Cfengine

2010-12-30 Thread Nick Anderson
On Thu, Dec 30, 2010 at 04:41:23PM -0600, Nick Anderson wrote: > That design pattern could be used to make an http call back to some > centralized location and record information in a database or even just > use http put to drop it into a file, similiar to how you are using the > nfs

Re: generating a list of all your current servers using Cfengine

2010-12-31 Thread Nick Anderson
On Fri, Dec 31, 2010 at 05:01:14PM +0100, Erlend Leganger wrote: > Heh, you learn something new every day... I configured my Apache > server and made a PUT handler as described in [1], then I can use curl > on the client to upload files: > curl --request PUT --upload-file heartbeat.txt > -Hheartbea

Re: What SVN hooks do you use in pre-commit / post-commit?

2011-01-28 Thread Nick Anderson
t / post-commit. > Anyone checking / creating JIRA tickets, validating the syntax of the > promises, or other cool stuff? I’d be curious to see what other folks > are doing. I have a pre-commit hook that re-writes author name since authenticaion uses an obtuse unique user id from

files copy_from purge behavior

2011-04-19 Thread Nick Anderson
I see that in files copy_from the purge option will remove files on the client that do not match files on the server. with 3.1.2 it does not appear to remove directories on the client hat do not match directories on the server. Is there supposed to be a different option for that? -- Nick

Re: Cfengine Help: Re: files copy_from purge behavior

2011-04-19 Thread Nick Anderson
ris hosts. > https://cfengine.com/bugtracker/view.php?id=201 Perhaps I was not paying close enough attention. It appears to be purging properly now. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/

Re: Literature on Cfengine3

2011-04-26 Thread Nick Anderson
ut is greatly appreciated. The documentation at cfengine.org is available, but as far as published books I don't think there are any yet. I believe there is at least one in the works. Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfeng

Re: Cfengine 3.1.5 is released -- a bugfix release

2011-05-04 Thread Nick Anderson
the version > field, thanks! You know CVS is dead right? ;) -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Cfengine Help: Re: Restarting cf-execd ?

2011-05-06 Thread Nick Anderson
he processes applies to all nodes. At least thats probably the easiest way to configure it if inputs changes restart services. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Time classes lifecycle index

2011-05-07 Thread Nick Anderson
Will someone explain to me what this is used for? Perhaps I am dense, but I dont understand what the year number is, or why it would be useful. A `lifecycle index', which is the year number modulo 3 (used in long term resource memory). -- Nick And

Re: Time classes lifecycle index

2011-05-07 Thread Nick Anderson
the first time cfengine ran on the node or something it would make more sense to me. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Emailing reports

2011-05-08 Thread Nick Anderson
mailed if cf-agent is executed by cf-execd or so it seems (so long as the report is not a duplicate). Is that correct? Can someone point me to the documentation that describes the behavior? There is currently no support for emailing promisees reports is there? -- Nick Anderson

Re: Cfengine Help: Re: the relation of entropy to anomaly detection - what does entropy mean here? how does this work?

2011-05-10 Thread Nick Anderson
On Tue, 2011-05-10 at 16:26 +0200, no-re...@cfengine.com wrote: > Cfengine's monitoring is very different and superior to anything else I've > seen. Cf notices when things are abnormal for that particular host. Normal > monitoring solutions use centralized thresholds that are then manually > c

User/Group Management

2011-05-16 Thread Nick Anderson
I've seen a few user management bundles floating around but I haven't seen much for group management. I like the array pattern for defining user and group configuration but I am running into an issue with groups. Here are my bundles bundle agent definegroups { vars: "group[users]" slist =>

Re: Cfengine Help: Re: where to put local promises? site.cf?

2011-05-19 Thread Nick Anderson
On Thu, 2011-05-19 at 14:37 +0200, no-re...@cfengine.com wrote: > Forum: Cfengine Help > Subject: Re: where to put local promises? site.cf? > Author: neilhwatson > Link to topic: https://cfengine.com/forum/read.php?3,21932,22062#msg-22062 > > Organize the files anyway you like Aleksey. As long as

Re: Security Tools and Root Access

2011-08-13 Thread Nick Anderson
n argue that machines dont have free will because they arent sentient, but I'm sure there are plenty of people who would argue that you have no proof that machines aren't sentient. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Minimal provisioning network

2011-08-19 Thread Nick Anderson
On 08/19/2011 03:39 AM, no-re...@cfengine.com wrote: > By contrast, the provisioning network has no DNS or NIS at all, only DHCP. I think you will want to look at skipverify in the control bodys. -- Nick Anderson ___ Help-cfengine mailing list H

Re: CFEngine Help: update.cf: multiple "copy_from" servers

2011-08-23 Thread Nick Anderson
uld be nice for modular bundles. There is the COPBL but Its mainly for body parts, There is a github account Aleksey started but it has minimal participation so far https://github.com/cfengine/contrib. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: How to run a command every two hours?

2011-08-23 Thread Nick Anderson
constraints when you ran the test? Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: How to run a command every two hours?

2011-08-24 Thread Nick Anderson
it, it must be in your inputs or cfengine won't be able to find it. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: New features of CFEngine 3.2.0

2011-08-29 Thread Nick Anderson
to ask if you were planning on doing this again. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: Understanding CF's log

2011-08-30 Thread Nick Anderson
at end I don't think your failsafe or any dependent files (if any) should change very often at all once you get going. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: CFEngine Help: Re: Understanding CF's log

2011-08-30 Thread Nick Anderson
policy update from happening. If you only run cf-agent normally a syntax error in your promises.cf may prevent the policy from updating without manual intervention. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: CFEngine Help: Re: CFEngine Help: Re: Understanding CF's log

2011-08-30 Thread Nick Anderson
syntax error preventing it from running. Would it not > go to failsafe? Perhaps I missed something, but I don't think thats what I have observed in the past. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfe

Re: CFEngine Help: Call bash commands in cfengine

2011-09-06 Thread Nick Anderson
t global env values? > > Below is part of my code that didn't work: > > ... > bundle agent set_profile > { > commands: > "source /etc/profile" > contain => in_shell_and_silent; > } source is a shell bu

Re: CFEngine Help: Re: Checking promisses in different location

2011-09-30 Thread Nick Anderson
file... not specified in help page ;) I noticed that the other day, Thanks for reminding me to file a bug. https://cfengine.com/bugtracker/view.php?id=828 -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.o

Re: Where did the training videos go?

2011-10-12 Thread Nick Anderson
On 10/12/2011 02:28 PM, Jeff Blaine wrote: > There used to be 4 great videos up of Mark's training/presentation > > http://cfengine.com/training They are still there, inside the engine room. https://cfengine.com/inside/videos --

Re: Where did the training videos go?

2011-10-12 Thread Nick Anderson
On 10/12/2011 02:31 PM, Nick Anderson wrote: > On 10/12/2011 02:28 PM, Jeff Blaine wrote: >> There used to be 4 great videos up of Mark's training/presentation >> >> http://cfengine.com/training > > They are still there, inside the engine room. > > https:

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Nick Anderson
to implement NTP", >>package_policy=> "add", >>package_method=> apt; # defined in stdlib You probably need something like this. body agent control { # This is needed for packages that want some configuration like # postfix.

Re: CFEngine Help: Re: cf-agent run time limit (hanging during package installation)

2011-11-17 Thread Nick Anderson
g. And a bad one. Maybe it would be a good idea to have a promise timeout. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Methods example

2011-11-21 Thread Nick Anderson
ted" status codes instead of hard coding only 200 in. Is thee some native cfengine function that I could use in check_http_content so as not to rely on curl being available? -- Nick Anderson # Example Usage # "any" usebundle => check_http_status("www.cmdln.org", "80"

Re: Applying a promise to all hosts in a network from a single policy server.

2011-11-22 Thread Nick Anderson
does increase the complexity of the failsafe.cf a bit, and generally you want it to be as simple as possible. As for applying a promise to all nodes you can use the any class. Hope it helps. -- Nick Anderson bundle agent motd { vars: "last_update_report" string => execr

Re: CFEngine Help: Re: Methods example

2011-11-22 Thread Nick Anderson
tatus bundle. I was only getting the http status code back, similar to the example. I used curl when I want to check that some specific content on the page exists. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cf

Re: CFEngine Help: Re: CFEngine Help: New Book on Cfengine

2011-12-08 Thread Nick Anderson
for a few days and try again. Try ERR20 20% off all purchases -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Thoughts about some cfengine design decisions?

2011-12-14 Thread Nick Anderson
ead becomes: > > "$(crond)/cfrun" > perms => "{ mode: 644, owners: ['root'] }"; I think that is infinitely more readable. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Capturing change detection output

2011-12-19 Thread Nick Anderson
What would the best way to capture a list of the files detected changed into a list? -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: (addendum) How easy/simple is cfengine?

2011-12-20 Thread Nick Anderson
ovide a repository for > community sharing of modules, bundles and policies. More details to come in > the near future :) I hope you can deliver that by Christmas morning ;) -- Nick Anderson ___ Help-cfengine mailing list Help-cfe

Re: Master to client security, signing?

2011-12-22 Thread Nick Anderson
said either tool could be compromised and used to hijack your infrastructure. But it also gives you the ability to manage more machines than just logging in directly. Not to mention the self documenting nature of any config management system which alone can be wor

Re: Master to client security, signing?

2011-12-28 Thread Nick Anderson
beyond a few nodes I usually have one of those few nodes act as a master for the files that are checked out from version control. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: Master to client security, signing?

2011-12-28 Thread Nick Anderson
_all_ of my clients to do that. I know others do, I think Aleksey does it that way. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: if assignment in cfengine

2012-01-04 Thread Nick Anderson
getindices("$(v)"); # Be careful if the index string contains funny chars "cindex[$(index)]" string => canonify("$(index)"); field_edits: # match a line starting like the key = something "\s*$(index)\s*=.*" edit_field => col("=&

Re: CFEngine Help: CFEngine Help:Health check for cf-agent

2012-01-04 Thread Nick Anderson
nrpe, or ssh etc ... The Nova edition might have some of that central reporting but I am not sure. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: (addendum) How easy/simple is cfengine?

2012-01-04 Thread Nick Anderson
h and should be treated as such. Provide an easy/convenient and standardized way to contribute and use community contributions. Also fix the COPBL or add a new stdlib that has a higher quality control and phase out the COPBL. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Syntax help - access slist stored in array

2012-01-12 Thread Nick Anderson
quot;$(groupindex)","4","@(groups[$(groupindex)][members])"; } I can get it to expand out to groups[specialadmins][members] but not the slist stored there, I am sure I am mis understanding some concept here, can someone enlighten me? -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: !!! System error for fclose: "No space left on device"

2012-01-13 Thread Nick Anderson
e > this file; however, I was looking more for a setting that I can set so that > this file is limited to a certain size. You could schedule it for garbage collection like any other log file. -- Nick Anderson ___ Help-cfengine mailing list

Re: Syntax help - access slist stored in array

2012-01-13 Thread Nick Anderson
On 01/13/2012 05:15 AM, Nicolas Charles wrote: > On 13/01/2012 07:05, Nick Anderson wrote: >> I cant seem to get the syntax right for accessing a list stored in an array. >> >> I define users and groups using arrays, I would like to be able to use >> the same style

Re: CFEngine Help: package lists being updated after every run?

2012-01-17 Thread Nick Anderson
Yeah i noticed that it changed in svn for yum recently. I think that the previous behavior was a bit zealous. You could add action => if_elapsed to your package policy. no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: package lists being updated after every run? >Author: simonblake

Re: CFEngine Help: User Management

2012-01-19 Thread Nick Anderson
ng a process. Here it is just as another example. And if anyone has any suggestions how to get days since epoch without a commands promise that would be great. -- Nick Anderson body common control { bundlesequence => { "main" }; inputs => { "cfengine_stdlib.cf&q

Re: CFEngine Help: Re: CFEngine Help: User Management

2012-01-19 Thread Nick Anderson
serving. Regardless I think the COPBL is missing a complete set of local user management bundles to help abstract the process a bit. If I ever finish mine I'll be sure to submit them :). -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine

Re: CFEngine Help: Re: Promises repaired in promise_summary

2012-01-19 Thread Nick Anderson
f doing Thanks for clarifying that simon, I had not realized that. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Dealing with vars changing

2012-01-19 Thread Nick Anderson
> "/usr/sbin/sshd"; >"argument"string => ""; >"cfg_file"string => "/etc/ssh/sshd_config"; >"cfg_source" string => "/etc/ssh/sshd_config"; >"mode"s

Re: CFEngine Help: Dealing with vars changing

2012-01-19 Thread Nick Anderson
On 01/19/2012 11:10 PM, Nick Anderson wrote: > I dont understand how the variables arent clobbering eachother in this > policy. > > Maybe its late and I am missing something, but it looks to me like your > redefining daemon, processes, argument, cfg_file, cfg_source, mode, > us

Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-20 Thread Nick Anderson
go, I cant think of a better way to do it yet, would be nice to be able to just selectively edit it. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-20 Thread Nick Anderson
On 01/20/2012 08:51 AM, Nick Anderson wrote: > On 01/20/2012 01:35 AM, no-re...@cfengine.com wrote: >> Forum: CFEngine Help >> Subject: Re: maintaining /etc/security/limits.conf with cf3 >> Author: zzamboni >> Link to topic: https://cfengine.com/forum/read.php?3,2146

Re: CFEngine Help: Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-24 Thread Nick Anderson
y ? That did not make any corrections for me. it added the lines, but for example if there is already an entry for sybase hard memlock 1000 it does not get altered. On a side note, seems like insert_lines location before() is not in the stdlib, after is but not before.

Help with managing regions in a config file.

2012-01-26 Thread Nick Anderson
; Edited file /tmp/sshd_config and it adds the sections to the config $ cat /tmp/sshd_config Match User restricteduser Match Group sftponly on the second execution I get no errors $ cf-agent -KIf ./sshd_sftponly.cf -> Edited file /tmp/sshd_config but only one section is edited. $ cat /tmp/sshd_

Re: CFEngine Help: Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-26 Thread Nick Anderson
sybase hard memlock 1"; That seems like a poor way to communicate meaning. Here is the edited version as well. -- Nick Anderson body common control { bundlesequence => { "configfiles" }; inputs => { "/var/cfengine/masterfiles/cfengine_stdlib.cf" }; version

Re: CFEngine Help: Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-26 Thread Nick Anderson
I also added an insert_lines for "# End of file" because if you don't have it, it errors. Though I think it's not necissary to have that before "# End of file" location directive. Did you have a specific reason why you added it? no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Re

Re: CFEngine Help: Re: Help with managing regions in a config file.

2012-01-26 Thread Nick Anderson
Thanks Diego, I had a feeling it was in the select_region body but had not pinned it down. I'll take a closer look this evening to make sure I better understand. no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Re: Help with managing regions in a config file. >Author: zzamboni >Li

Re: CFEngine Help: Re: CFEngine Help: Re: maintaining /etc/security/limits.conf with cf3

2012-01-26 Thread Nick Anderson
yeah you had the before section, but I didn't see anything that ensured the "# End of File" string was actually in the file, maybe I just missed it. For what it's worth I found that negative look ahead pattern in replace_or_add in the stdlib. no-re...@cfengine.com wrote: >Forum: CFEngine Hel

Re: CFEngine Help: Re: Help with managing regions in a config file.

2012-01-26 Thread Nick Anderson
Ah yes, I see now what I did wrong. Thanks again Diego! Nick Anderson wrote: >Thanks Diego, I had a feeling it was in the select_region body but had >not pinned it down. I'll take a closer look this evening to make sure >I better understand. > >no-re...@cfengine.

Re: CFEngine Help: bundles: can a class argument be passed?

2012-01-27 Thread Nick Anderson
ferent bundles, and call one bundle if the class exists, and one if it does not. Perhaps that is considered the "proper" way because your containing a specific idea, not a decision tree. -- Nick Anderson ___ Help-cfengine mailing list Hel

Re: CFEngine Help: Re: bundles: can a class argument be passed?

2012-01-27 Thread Nick Anderson
es, depending on that incoming argument.) Here is one that works like that, just play with commenting/uncommenting the some_class_name expressions in the main bundle. -- Nick Anderson body common control { bundlesequence => { "main", }; inputs => { "cfengine_stdlib.cf&

Re: CFEngine Help: Re: cfengine causing crontab -e to crash..?

2012-02-01 Thread Nick Anderson
nges", > signals => { "hup" }; cron will match on crontab as well. I think it will also match if you did vim mycronfile since cron was in the process string. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: cfengine causing crontab -e to crash..?

2012-02-01 Thread Nick Anderson
unt for slight differences.) > > On the system I'm on at the moment for example, it looks like I should be > able to match "/usr/sbin/cron" to avoid also matching again "crontab -e" or > "vi /var/spool/cron/foo" or the like.

Re: CFEngine Help: Re: cfengine causing crontab -e to crash..?

2012-02-01 Thread Nick Anderson
t even necessary any more for some > implementations, no? Nope, not required on all systems. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

interfaces promises

2012-02-04 Thread Nick Anderson
management as well. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Editing /etc/shadow file using variables

2012-02-05 Thread Nick Anderson
Can you provide verbose output Please? no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Editing /etc/shadow file using variables >Author: josephvj >Link to topic: >https://cfengine.com/forum/read.php?3,24723,24723#msg-24723 > >Hi, >I'm out of scope in editing /etc/shadow file using va

Re: CFEngine Help: Re: CFEngine Help: Editing /etc/shadow file using variables

2012-02-05 Thread Nick Anderson
er exists, you don't wasn't to add a line and set the field. user existence means they are found in /etc/passwd, but that does not necessarily correspond with an entry in /etc/shadow. Take a look at this bundle for some ideas. -- Nick Anderson body common control { b

Re: CFEngine Help: Re: CFEngine Help: Editing /etc/shadow file using variables

2012-02-05 Thread Nick Anderson
probably get set on a subsequent execution in 5 minutes or whatever. The key thing here to realize and you may or may not want this behavior, is that now the password setting will always be enforced. Each time your policy runs that users password will be set to what you defined. I hope that makes s

Re: CFEngine Help: Re: CFEngine Help: Editing /etc/shadow file using variables

2012-02-06 Thread Nick Anderson
able advise. Your welcome, I hope it helps. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: create class which is a superset of another class

2012-02-06 Thread Nick Anderson
> > > "agents" expression => regcmp( "ag.*" , "${sys.host}"); > > > > but I have two hosts that would match that expression and I want to > exclude them. Let's say they are agent041 and agent042. In that case I think y

Re: CFEngine Help: Re: How to uninstall cfengine on Linux node

2012-02-06 Thread Nick Anderson
I think the package name is cfengine-community no-re...@cfengine.com wrote: >Forum: CFEngine Help >Subject: Re: How to uninstall cfengine on Linux node >Author: zzamboni >Link to topic: >https://cfengine.com/forum/read.php?3,24739,24740#msg-24740 > >If you installed the binary packages from cfeng

Re: Chicken/egg Policy-server/client

2012-02-07 Thread Nick Anderson
cy that you want to apply to a host. Take a look at the classes that are defined by default on a host cf-promises -v | grep Defined you should find several classes that relate to hostname and domain name that are probably a good place to start figuring out how to use classes fo

Re: CFEngine Help: New Book on Cfengine

2012-02-08 Thread Nick Anderson
ook if it deals with such > situation, meaning: dealing with a configuration files which could have > "stanzas" a-la-sshd_config, and doing the right thing. This might have what your looking for Marco, perhaps Diego can update his sshd promise to include a location before Match.

Re: Set class on values in iptables

2012-02-10 Thread Nick Anderson
he examples and tutorials and > documents I can get my hands on, but the learning curve is pretty high > so theres a good chance I've missed it :| > > Thanks in advance for any help or direction anyone can give! What if instead of inserting the rule on the fly you edit the saved

Re: Set class on values in iptables

2012-02-10 Thread Nick Anderson
be wanting to use the location in insert lines for sure (http://cfengine.com/manuals/cf3-reference.html#location-in-insert_005flines), to place your insert before your deny rule. Attached is an example that uses the select region, I hope its close enough to get you started. -- Nick Anderson

Problems looping over slist with global reference

2012-02-13 Thread Nick Anderson
: List 1: list1v2 R: List 1: list1v3 R: In bundle agent main R: String 1: string value 1 R: String 2: string value 2 R: List 1: $(site.list1) -- Nick Anderson body common control { bundlesequence => { "site",

Re: CFEngine Help: how to include username in file change detection policy

2012-02-13 Thread Nick Anderson
e file and what specific lines were changed? If all changes made are kept in version control you could get the desired information from there. You might be able to write an agent that hooked into something like inotify (though I am not even sure you can ferret all the info you w

Re: CFEngine Help: Re: Problems looping over slist with global reference

2012-02-13 Thread Nick Anderson
ehaviour. Consider it a known bug for the > time being. > > http://cfengine.com/manuals/cf3-reference.html#List-variable-substitution-and-expansion Thanks Mark, btw, the manual seems broken or the nav changed so much that I am confused. Ill go find the pdf of the curre

Re: CFEngine Help: Re: Problems looping over slist with global reference

2012-02-13 Thread Nick Anderson
: l3 $(main.array[key]) R: test: l4 $(main.array[key]) R: test: l5 $($(main.array)[key]) R: test: l6 @(main.array[key]) R: test: l7 @(config[key]) R: test: s1 stringvalue R: test: s2 stringvalue R: main: l1 listitem1 R: main: l1 listitem2 R: main: l2 $(this.array[key]) -- Nick Anderson body c

Re: CFEngine Help: Re: Problems looping over slist with global reference

2012-02-14 Thread Nick Anderson
On 02/13/2012 11:49 PM, Mark Burgess wrote: Just drop the qualifier $(context.variable) -> $(variable) I had a report like that "test: l1 $(config[key])"; I got this output R: test: l1 $(config[key]) Sorry I must be quite dense for not seeing what I am doing wrong. --

Re: CFEngine Help: Create areas and the deployment of files

2012-02-15 Thread Nick Anderson
168_55_4"); 172_30_64_171 and 192_168_55_4 are also valid class names. You could do an slist with your ips and then create a canonified list to use in your class match. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Create areas and the deployment of files

2012-02-15 Thread Nick Anderson
On 02/15/2012 10:26 AM, Nicolas Charles wrote: > Oh yes, I've been overcomplexifying with the ipv4 prefix, thank you Nick > But I feel the iprange function more usable in case of complex architecture I should finish reading things, thats very nice, I didn't know that function existed and i missed

Find which nic(s) match with iprange?

2012-02-17 Thread Nick Anderson
see a way to accomplish it. -- Nick Anderson ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine

Re: CFEngine Help: Re: Find which nic(s) match with iprange?

2012-02-17 Thread Nick Anderson
to that being harder to read I use that specific value for removing any conflicting routes as well so then my issue would be getting the value of the subnet which I suppose I could split out of the string to get. just rambling now thinking out loud. -- Nick Anderson

Is there a way to get the current bundle name?

2012-02-17 Thread Nick Anderson
quot;172.16.210.65"; "eth1[NETMASK]" string => "255.255.255.192"; files: "/etc/sysconfig/network-scripts/ifcfg-$(interfaces)" comment => "Configure interface for persistance" edit_defaults => n

  1   2   3   >