RE: Deleting expired user accounts

2009-12-02 Thread Justin Lloyd
t to be able to specify that to such an expirdeaccounts() function. Justin -Original Message- From: Paul Krizak [mailto:paul.kri...@amd.com] Sent: Monday, November 30, 2009 8:28 AM To: Justin Lloyd Cc: Mark Burgess; help-cfengine@cfengine.org Subject: Re: Deleting expired user accounts T

RE: invalid mode string error.

2009-12-04 Thread Justin Lloyd
I see the same error in Nova. [r...@cflinux1 masterfiles]# cf-agent -V This comprises cf-agent core community version 3.0.3 - (C) Cfengine AS 2008- This core uses commercial Nova extensions at version 1.0.10 (C) Cfengine AS 2009- [r...@cflinux1 masterfiles]# -Original Message- From: hel

Dependency problems building from SVN

2009-12-15 Thread Justin Lloyd
I'm attempting my first build of cfengine 3 out of svn and it appears to want version 1.10 of automake, which starts a whole chain of dependencies (autoconf, m4, certain functions in rpmlib) that are not available as updates to RHEL 5. Anyone else have this problem? Is it required to have the lates

RE: Dependency problems building from SVN

2009-12-15 Thread Justin Lloyd
ion]) autoheader: warning: missing template: MINGW autoreconf: /usr/bin/autoheader failed with exit status: 1 [jll...@cflinux3:~/cfengine/community/trunk] Justin -Original Message- From: Nicolas Charles [mailto:charl...@gmail.com] Sent: Tuesday, December 15, 2009 12:31 PM To: Justin Lloyd Cc: he

Error when compiling with pcre

2009-12-15 Thread Justin Lloyd
When I try to compile from svn and include pcre, I get the following error during the make: In file included from cf3.defs.h:1622, from cf3parse.y:10: prototypes3.h:1068: error: conflicting types for 'strstr' prototypes3.h:1071: error: expected identifier or '(' before '__ex

RE: Error when compiling with pcre

2009-12-15 Thread Justin Lloyd
specify the path [jll...@cflinux3:~/cfengine/community/trunk] -Original Message- From: Jarle Bjørgeengen [mailto:ja...@bjorgeengen.net] Sent: Tuesday, December 15, 2009 2:21 PM To: Justin Lloyd Cc: help-cfengine Subject: Re: Error when compiling with pcre Maybe configure --with-libp

RE: Error when compiling with pcre

2009-12-15 Thread Justin Lloyd
:nwat...@symcor.com] Sent: Tuesday, December 15, 2009 2:18 PM To: Justin Lloyd Cc: help-cfengine; help-cfengine-boun...@cfengine.org Subject: Re: Error when compiling with pcre Do you need both the i386 and x84_64 libs? Perhaps remove one. Sincerely, -- Neil Watson 416-673-3465 This elect

RE: Error when compiling with pcre

2009-12-15 Thread Justin Lloyd
009 2:53 PM To: Justin Lloyd Cc: help-cfengine Subject: Re: Error when compiling with pcre Did you install the pcre-devel package ? - Jarle On Dec 15, 2009, at 10:30 , Justin Lloyd wrote: > Sorry, I should have mentioned that I did try that. > > [jll...@cflinux3:~/cfengine/community/

Updating Solaris cfengine binaries

2009-12-17 Thread Justin Lloyd
I have a theoretical question regarding updates of cfengine binaries on Solaris systems. I've not tested this yet, so I'm just looking for comments from anyone who has experience with this. If cfengine is installed as a package, when cfengine pulls updated binaries from the policy server, that woul

RE: Updating Solaris cfengine binaries

2009-12-17 Thread Justin Lloyd
nt binary updates are done via the standard update.cf, that is going to "break" the Solaris package database. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Thursday, December 17, 2009 12:16 PM To: Justin Lloyd Cc: help-cfengine; help-c

Triggering an alert when repairs occur

2010-01-19 Thread Justin Lloyd
Hi all, I'm still in my documentation and about to start our pilot phase of a Nova implementation, but I'm thinking about how to handle certain aspects of managing a Cfengine environment. One thing I would like to be able to do would be to create an alerting system any time a promise is repaire

RE: Triggering an alert when repairs occur

2010-01-19 Thread Justin Lloyd
ustin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Tuesday, January 19, 2010 1:35 PM To: Justin Lloyd Cc: help-cfengine; help-cfengine-boun...@cfengine.org Subject: Re: Triggering an alert when repairs occur You can do this. I've done it myself.

RE: Triggering an alert when repairs occur

2010-01-19 Thread Justin Lloyd
...@symcor.com] Sent: Tuesday, January 19, 2010 1:53 PM To: Justin Lloyd Cc: help-cfengine; help-cfengine-boun...@cfengine.org Subject: RE: Triggering an alert when repairs occur Something like this: files: "${trg}" perms => m( "${mod}" ),

RE: wish list

2010-01-22 Thread Justin Lloyd
As for the hard classes, what about reading /var/cfengine/state/allclasses.txt? [jll...@gdcscf3lgmt01:/var/cfengine/state] cat allclasses.txt any Friday Hr22 Evening Min55 Min55_00 Q4 Hr22_Q4 Day8 January Yr2010 Lcycle_0 GMT_Hr22 linux <...snipped for brevity...> [jll...@gdcscf3lgmt01:/var/cfengin

RE: wish list

2010-01-22 Thread Justin Lloyd
ry 22, 2010 1:33 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; Paul Krizak Subject: RE: wish list Can you get allclasses.txt without needing some form of inputs? When I'm building or bootstrapping new architecture clients I often don't have fully prepared inputs ready. This is

Turning a hostname list into a class list

2010-01-29 Thread Justin Lloyd
If I have a list of hostnames, many of which have hyphens in them, what's the cleanest way of generating a class list. For example, say I have the following slist, which may come from a text file, LDAP, or may just be hard-coded in a policy file. vars: "test_hosts" slist => { "foo

RE: Turning a hostname list into a class list

2010-01-29 Thread Justin Lloyd
pression error "missing )" in expression "(€¬ ଠ" at 9 [...snipped 80 more of those errors...] R: gdcscf3lgmt01 R: foo R: bar-a R: baz-b R: blah # Another error message I've seen in otherwise identical output is: Regular expression error "missing termi

Team-based Cfengine Management

2010-02-01 Thread Justin Lloyd
Hi all, For those of you who are part of a team that manage a Cfengine-based environment, how do you prevent people from making local changes to things that are managed by Cfengine, thus causing local changes to get wiped out? For example, if Cfengine manages all NFS mounts in /etc/fstab on Lin

RE: Team-based Cfengine Management

2010-02-01 Thread Justin Lloyd
etc/fstab and automounter files (or netgroups in /etc/passwd, etc.) but we certainly may need to give more latitude in such configurations. Thanks, Justin -Original Message- From: Mark Burgess [mailto:mark.burg...@iu.hio.no] Sent: Monday, February 01, 2010 12:20 PM To: Justin Lloy

RE: Team-based Cfengine Management

2010-02-01 Thread Justin Lloyd
7;t happen. Realistically... Thanks, Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Monday, February 01, 2010 12:08 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Team-based Cfengine Management I&#x

RE: Team-based Cfengine Management

2010-02-01 Thread Justin Lloyd
operly keep it updated, but it would work. -Bryan On Mon, 1 Feb 2010, Justin Lloyd wrote: > Date: Mon, 1 Feb 2010 12:42:42 -0700 > From: Justin Lloyd > To: nwat...@symcor.com > Cc: help-cfengine@cfengine.org, help-cfengine-boun...@cfengine.org > Subject: RE: Team-based Cfengine Ma

RE: Team-based Cfengine Management

2010-02-02 Thread Justin Lloyd
- From: Mike Hoskins [mailto:micho...@cisco.com] Sent: Tuesday, February 02, 2010 11:59 AM To: Tim Cutts; Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Team-based Cfengine Management On 2/2/10 12:08 AM, "Tim Cutts" wrote: > Finally, if there really are some machines whic

RE: Team-based Cfengine Management

2010-02-02 Thread Justin Lloyd
From: Mike Hoskins [mailto:micho...@cisco.com] Sent: Tuesday, February 02, 2010 2:00 PM To: Justin Lloyd; Tim Cutts Cc: help-cfengine@cfengine.org Subject: Re: Team-based Cfengine Management On 2/2/10 12:27 PM, "Justin Lloyd" wrote: > I've not thought it through completely, but I re

Defining classes using array values

2010-02-03 Thread Justin Lloyd
I'm trying the following which doesn't work: vars: # parse /etc/digitalglobe.conf into the array $(config) "config_count" int => readstringarray("config", "/etc/digitalglobe.conf", "#[^\n]*", "=", 20, 2000); classes: # create a class named config_$RUNTIME

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
a bug. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 11:57 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Defining classes using array values I get a similar message but stil

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
may be ok as an RHS value but not LHS. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 12:15 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: RE: Defining classes using array v

RE: Defining classes using array values

2010-02-03 Thread Justin Lloyd
-Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, February 03, 2010 12:34 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: RE: Defining classes using array values Still wfm [r...@unxxhd01 inputs]# cf-age

Email notification of repairs

2010-02-05 Thread Justin Lloyd
Hi all, I've opened a ticket on this but I wanted to share my thoughts with the community to see if anyone has had the same thought and perhaps has already implemented something to this effect. I'd like for Cfengine on each host to be able to send an email every time it tries to repair a pr

RE: Email notification of repairs

2010-02-05 Thread Justin Lloyd
ct, neither promise needs to be repaired. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Friday, February 05, 2010 11:02 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Email notification of

RE: Email notification of repairs

2010-02-09 Thread Justin Lloyd
ter Systems Engineer Berkeley, CA 94720 ESnet http://www.es.net/ Desk: 510/495-2243 On Fri, 5 Feb 2010 10:55:18 -0700, Justin Lloyd wrote: > Hi all, > > I've opened a ticket on this but I wanted to share my thoughts with > the community to see if anyone has had the s

Community Open Promise Body Library suggestions

2010-02-09 Thread Justin Lloyd
I just started skimming over the COPBL and wanted to perhaps kick off a suggestions thread: body depth_search infinite { depth => "inf"; } I couldn't think of a good name for this next one, but it would ensure that only a single specified line of text is in a file, only deleting what doesn't

RE: Email notification of repairs

2010-02-09 Thread Justin Lloyd
Has anyone done any investigation into having a monitoring tool like Zenoss (which we use), Nagios, or OpenNMS watch for repairs? At the very least, centralizing at least some of Cfengine hosts' logs and using a log-watching tool like Swatch or Splunk would be a step in the right direction. Team C

RE: Email notification of repairs

2010-02-09 Thread Justin Lloyd
t be nice to have some configurable mechanism for detecting such things as quickly as reasonably possible. Justin From: Michael Potter [mailto:mega...@gmail.com] Sent: Tuesday, February 09, 2010 2:30 PM To: Justin Lloyd Cc: Neil Watson; help-cfengine@cfengine.org Subject: Re: Email notification of

RE: Email notification of repairs

2010-02-09 Thread Justin Lloyd
n of repairs On 2/9/2010 3:09 PM, Justin Lloyd wrote: > Has anyone done any investigation into having a monitoring tool like > Zenoss (which we use), Nagios, or OpenNMS watch for repairs? At the very > least, centralizing at least some of Cfengine hosts' logs and using a > log-watc

RE: Directory permissions, and multiple body bundles.

2010-02-09 Thread Justin Lloyd
I understand what Mark is saying, but there are two ways I can see of looking at an "under the hood" analogy. Looking at the complexity of an engine, that engine could either be the configuration engine itself (i.e. Cfengine) or it could be the source code. Looking at Cfengine's source, it's quite

RE: Directory permissions, and multiple body bundles.

2010-02-09 Thread Justin Lloyd
org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Les Mikesell Sent: Tuesday, February 09, 2010 3:50 PM To: help-cfengine@cfengine.org Subject: Re: Directory permissions, and multiple body bundles. On 2/9/2010 4:23 PM, Justin Lloyd wrote: > > In a small team of admins, like mine,

Deleting lines from a files that don't match a list

2010-02-10 Thread Justin Lloyd
Suppose you have an slist that contains a list the only netgroups you want in /etc/passwd (ignore /etc/shadow for this example) on a given system. It's easy to ensure they're all there, but how would you ensure that no other netgroups are in the file? For example, given: bundle agent test { va

RE: Deleting lines from a files that don't match a list

2010-02-11 Thread Justin Lloyd
ystems. Thanks, Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Wednesday, February 10, 2010 11:30 AM To: help-cfengine@cfengine.org Subject: Deleting lines from a files that don't match a list

RE: Community Open Promise Body Library suggestions

2010-02-11 Thread Justin Lloyd
Another thought would be to add a third true/false parameter to the copy bodies in library.cf or to add new ones to enable backups. So either: body secure_cp(from, server, backup) body remote_cp(from, server, backup) body local_cp(from, backup) or new ones, perhaps like this: body secure_cp_with

RE: Deleting lines from a files that don't match a list

2010-02-11 Thread Justin Lloyd
s. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Thursday, February 11, 2010 9:28 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: RE: Deleting lines from a files that don't match a list I was under the

RE: Deleting lines from a files that don't match a list

2010-02-11 Thread Justin Lloyd
way I want. Thanks, Justin -Original Message- From: Mark Burgess [mailto:mark.burg...@iu.hio.no] Sent: Thursday, February 11, 2010 9:57 AM To: Justin Lloyd Cc: nwat...@symcor.com; help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org Subject: Re: Deleting lines from a files that don

RE: Deleting lines from a files that don't match a list

2010-02-11 Thread Justin Lloyd
) { delete_lines: "\...@.*"; insert_lines: "+...@$(valid_netgroups):x:"; } Thanks! Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Thursday, February 11, 2010 11:00 AM To: Justin Lloyd Cc: help-cfengine@

Directory perms and ownership not getting set

2010-02-16 Thread Justin Lloyd
I've opened a ticket with Cfengine but I wanted to see if anyone else can replicate this problem. I've whittled it down to its essence, having copied in the library.cf:mog() body for test consistency. Basically, I cannot seem to get Cfengine Nova to create a directory and set its ownership and perm

RE: Directory perms and ownership not getting set

2010-02-17 Thread Justin Lloyd
2010 1:57 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Directory perms and ownership not getting set Justin, have you broken our software again ;-) We found this problem last week - remarkable that it's the simplest things that go awry. Anyway, this will be fixed in t

RE: regcmp help

2010-02-17 Thread Justin Lloyd
Theoretically speaking, this would probably only work with a two-line string, correct? If so, is there a way to do it generically, i.e. where you don't know how many newlines may be in the string nor on which line the desired match may exist, similar to //s in Perl? Justin -Original Messag

RE: regcmp help

2010-02-17 Thread Justin Lloyd
3:37 PM To: Justin Lloyd Cc: nwat...@symcor.com; Mark Burgess; Lebel, Marco; help-cfengine@cfengine.org Subject: Re: regcmp help Howdy, PCRE allows you to set the /s flag using (?s) at the beginning of the regex: PCRE_DOTALL If this bit is set, a dot metacharater in the pattern m

Good organizational practices

2010-02-17 Thread Justin Lloyd
Hi all, I'm curious about what good practices people have developed for organizing their local configuration files, bundles, bodies, special files, etc. as well as naming conventions for bundles, bodies, variables, etc. to prevent conflicts with defaults. I checked www.cfwiki.org but it doesn't se

RE: Who deletes all files in /var/cfengine/inputs?

2010-02-22 Thread Justin Lloyd
Is there a safe way to use the purge feature? I can see it being valuable for infrequent periodic use to clean up files that are removed from the masterfiles directory but then left in clients' inputs directories. (I've already been wanting something like this during my deploy testing.) Justin

Splaytime and hostname hashing

2010-02-25 Thread Justin Lloyd
The documentation states that splaytime specifies an integer number of minutes by which cf-execd's execution of cf-agent should be delayed. It states the delay is between 0 and splaytime minutes, which to nitpick should really read "0 to (splaytime * 60) seconds", since otherwise it could be misint

RE: Splaytime and hostname hashing

2010-02-25 Thread Justin Lloyd
Interesting, I'll poke through this. Thanks! Justin -Original Message- From: C R Ritson [mailto:c.r.rit...@newcastle.ac.uk] Sent: Thursday, February 25, 2010 11:24 AM To: Justin Lloyd; Help-cfengine Subject: RE: Splaytime and hostname hashing A colleague, now retired, wrot

RE: Splaytime and hostname hashing

2010-02-25 Thread Justin Lloyd
print "$_ = @{$hashtable{$_}}\n" foreach sort { $a <=> $b } keys %hashtable; --- cut here --- -Original Message- From: Justin Lloyd Sent: Thursday, February 25, 2010 9:51 AM To: Help-cfengine Subject: Splaytime and hostname hashing The documentation states that s

Overriding default variables

2010-02-25 Thread Justin Lloyd
I want to use the standard resolvconf() bundle but I need a special search list for certain hosts. I may eventually need more exceptions to the default, so I'm hoping the "any" approach would be fine. any:: # or should this be !special:: ? "dns_search_domains" string => "mydomain.com"; specia

RE: Overriding default variables

2010-02-25 Thread Justin Lloyd
; "special.mydomain.com mydomain.com"; other:: "dns_search_domain" string => "other.mydomain.com mydomain.com"; Justin -Original Message- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Thursday, February 25, 2010 1:38 PM To: Justin Lloyd Cc: Help

$(this.promiser) not working in promise comment

2010-02-26 Thread Justin Lloyd
Reading through section 12.6 about the variable context "this", it doesn't explicitly state whether $(this.promiser) would be available within the promise's comment. This does not work (pun intended): bundle agent test { files: "/tmp/blah" handle => "create_blah",

Editing known_hosts files

2010-02-26 Thread Justin Lloyd
Ok, I'm thoroughly stumped here. I had something from testing several months ago that I thought was doing the right thing, but now I don't think it was. I want to insert into ~root/.ssh/known_hosts on certain hosts the root public ssh key from a trusted root host. But the trickier part is to delet

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
t; slist => splitstring("line", " ", 3); delete_lines: ".*$(line[2])"; insert_lines: "$(line)"; Thoughts? Thanks, Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
Sorry, that delete_lines promise should have read delete_lines: ".*$(fields[2])"; -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Monday, March 01, 2010 11:50 AM To: Help-cfengine S

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
e that step. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Monday, March 01, 2010 11:54 AM To: Justin Lloyd Cc: Help-cfengine; help-cfengine-boun...@cfengine.org Subject: RE: Editing known_hosts files I'm still not sure why you might want to do this. Ssh

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
features, is a concern of mine for which I have a ticket open.) Justin -Original Message- From: d...@lonewolf.com [mailto:d...@lonewolf.com] On Behalf Of daniel.kl...@cfengine.com Sent: Monday, March 01, 2010 12:04 PM To: Justin Lloyd Cc: Help-cfengine Subject: Re: Editing known_hosts

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
loys), maybe something like "bundle agent fetch_public_ssh_key(remote_host, remote_user, local_user)". Thanks, Justin -Original Message- From: Mark Burgess [mailto:cont...@cfengine.com] Sent: Monday, March 01, 2010 1:04 PM To: Justin Lloyd Cc: daniel.kl...@cfengine.com; Help-cf

RE: Version control best practices?

2010-03-05 Thread Justin Lloyd
I'd like to throw out my own question about version control. I've finally finished my initial policy files for our pilot deploy (for the most part; need to update comments). There are four files that we currently maintain/edit: promises.cf, dg.config.cf, dg.library.cf, and dg.bundles.cf. The rest o

Thoughts about copy_from

2010-03-05 Thread Justin Lloyd
I just wanted to throw out a couple of thoughts about copy_from that have come up in my mind during my policy development: * The reference manual doesn't specify the default value for copy_from's copy_backup attribute. (That goes for a number of things in the documentation, actually.) * cfengine_

RE: Thoughts about copy_from

2010-03-05 Thread Justin Lloyd
Message- From: Jesse Becker [mailto:becker...@mail.nih.gov] Sent: Friday, March 05, 2010 12:57 PM To: nwat...@symcor.com Cc: Becker, Jesse (NIH/NHGRI) [C]; help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org; Justin Lloyd Subject: Re: Thoughts about copy_from On Fri, Mar 05, 2010

edit_line replace_with convergence issue

2010-03-05 Thread Justin Lloyd
According to the documentation, the following is not convergent: bundle agent ensure_pam_passwords_clear { files: "/etc/ldap.conf" edit_line => pam_password("clear"); } bundle edit_line pam_password(method) { replace_patterns: # haven't tested whether PCRE zero

RE: edit_line replace_with convergence issue

2010-03-05 Thread Justin Lloyd
/local (I know, I know...) by reading /etc/auto_direct, which is where I got this inspiration. Hope this helps others in the future. :) Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent:

RE: edit_line replace_with convergence issue

2010-03-05 Thread Justin Lloyd
rgent. :) Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Friday, March 05, 2010 6:23 PM To: help-cfengine@cfengine.org Subject: RE: edit_line replace_with convergence issue Never mind, I solv

soft class not visible across bundles

2010-03-09 Thread Justin Lloyd
I should be able to define a class in one bundle and use it in another. However, in the following example, the "curl_command_exists" class I define in the _verify_curl_command bundle doesn't appear to be available to the _verify_asset_command bundle. [r...@gdcscf3lgmt01 masterfiles.devel]# cf-agen

RE: soft class not visible across bundles

2010-03-09 Thread Justin Lloyd
If no one has any suggestions in the next couple of hours, I'll open a ticket with Cfengine. -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Tuesday, March 09, 2010 12:34 PM To: help-cfengi

RE: soft class not visible across bundles

2010-03-09 Thread Justin Lloyd
Ok, that would explain it. I'd forgotten that little, yet hugely important, detail. :) Back to the drawing board. Thanks, Dan! Justin -Original Message- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Tuesday, March 09, 2010 12:40 PM To: Justin Lloyd Cc: help-cfe

Evaluating a promise occasionally

2010-03-09 Thread Justin Lloyd
I have a promise that defines a class if it succeeds in fetching data from another system and writing that data to a local file: "fetched_asset_data" expression => returnszero( "$(dg.asset_command) -o $(dg.asset_cache_file) data $(sys.uqhost)", "noshell" ); I would like this promise to be eva

RE: Evaluating a promise occasionally

2010-03-10 Thread Justin Lloyd
quot; command is a script that hits our Asset Tracker web interface with a crafted AJAX URL. That's the remote database front end. -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, March 10, 2010 6:01 AM To: Justin Lloyd Cc: help-cfengine@cfengine

RE: Evaluating a promise occasionally

2010-03-10 Thread Justin Lloyd
day, I'm less concerned about systems being down and not doing something that was specified at a certain time. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, March 10, 2010 9:32 AM To: Justin Lloyd Cc: help-cfengine@cfengine.org;

RE: Evaluating a promise occasionally

2010-03-10 Thread Justin Lloyd
ke "hourly" or "daily" as its second argument. At least now I know I can use it for other stuff in the future now that I understand it. :) Thanks, Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Wednesday, March 10, 2010 9:5

array values not printing

2010-03-10 Thread Justin Lloyd
I'm trying to verify that a file with a bunch of VAR="value" entries is being read into an array variable correctly. I have the following: vars: asset_cache_exists:: "num_asset_cache_entries" int => readstringarray( "asset_cache", "$(dg.asset_cache_file)", "#[^\n]*"

RE: this.promiser with copy_from

2010-03-10 Thread Justin Lloyd
I reported this issue a while back and Dan submitted it as a ticket. I found that $(this.promiser) wasn't being interpolated in promise comments. Perhaps it is a broader issue that originally thought? -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...

RE: little Cfengine survey

2010-03-10 Thread Justin Lloyd
Hi Niek, I'm using Cfengine Nova and still in the process of deploying and testing Nova on a very small number of systems. I hope to complete our rollout entirely within the next 3 months. So based on that, here are my responses. 1. 14 currently, ~500 within the next few months 2. Small number of

Defining classes using "dist"

2010-03-10 Thread Justin Lloyd
wever, that the base dist_percent class would always be defined. Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Wednesday, March 10, 2010 10:02 AM To: nwat...@symcor.com Cc: help-cfengine@cfengine.or

RE: Defining classes using "dist"

2010-03-10 Thread Justin Lloyd
March 10, 2010 12:11 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" This sounds like a bug. Justin Lloyd wrote: > This is just an FYI post, so feel free to ignore my rambling if you're > not interested in some slightly deeper m

Iteration fails when interpolating array index

2010-03-10 Thread Justin Lloyd
Can anyone reproduce the following? It seems like a bug that is preventing iterating over an array element when interpolating the index. body common control { bundlesequence => { "test" }; } bundle agent test { vars: "an_slist" string => "an_slist"; "foo[$(an_slist)]

RE: Iteration fails when interpolating array index

2010-03-10 Thread Justin Lloyd
help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Wednesday, March 10, 2010 1:25 PM To: help-cfengine@cfengine.org Subject: Iteration fails when interpolating array index Can anyone reproduce the following? It seems like a bug that is preve

Calculating slist difference?

2010-03-10 Thread Justin Lloyd
Given two slists, "current_netgroups" and "valid_netgroups", I want to construct a new slists where $(netgroups_to_remove) = $(current_netgroups) - $(valid_netgroups) $(netgroups_to_add) = $(valid_netgroups) - $(current_netgroups) Is there currently a simple way to do this? If this isn't ea

RE: Defining classes using "dist"

2010-03-11 Thread Justin Lloyd
feature! :) Thanks, Justin -Original Message- From: Mark Burgess [mailto:mark.burg...@iu.hio.no] Sent: Wednesday, March 10, 2010 12:25 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" I mean the reevaluation of dist classes. Don'

RE: Defining classes using "dist"

2010-03-11 Thread Justin Lloyd
run during the same agent execution. Justin -Original Message- From: Daniel V Klein [mailto:d...@lonewolf.com] Sent: Thursday, March 11, 2010 1:02 PM To: Justin Lloyd Cc: Mark Burgess; help-cfengine@cfengine.org Subject: Re: Defining classes using "dist" This looks like a bug

splitting a "blank" line

2010-03-11 Thread Justin Lloyd
I want to do the following (unimportant details omitted) and so far I'm stumped: bundle agent test { vars: "output" string => execresult("somecommand", "noshell"); "netgroups" slist => splitstring("$(output)", "\s+", 20); files: "/etc/passwd" edit_lin

RE: splitting a "blank" line

2010-03-12 Thread Justin Lloyd
e. Can anyone help me understand this? (Yes, this is a hack because I can't figure out how to otherwise deal with blank results from my execresult() call.) Thanks, Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Ju

RE: splitting a "blank" line

2010-03-12 Thread Justin Lloyd
, "baz" }; delete_lines: ".*"; insert_lines: "$(lines)" insert_select => begins_with_b; } body insert_select begins_with_b { insert_if_match_from_list => { "b.*" }; } Does anyone else make use of insert_select and can help un

RE: Redefinition of a constant variable

2010-03-12 Thread Justin Lloyd
Use "overridable" on the default "services" variable. For example: vars: any:: "services" slist => { ... }, policy => "overridable"; redhat:: "services" slist => { "telnet", ... }; etc. Does that help? Justin -Original Message- From: help-cfengine-

RE: Redefinition of a constant variable

2010-03-12 Thread Justin Lloyd
Try creating an any:: version of the variable first and make that one overridable. -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of nwat...@symcor.com Sent: Friday, March 12, 2010 11:26 AM To: Matt Richards Cc: help-cfen

RE: splitting a "blank" line

2010-03-12 Thread Justin Lloyd
least I finally figured out the right logic. Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Justin Lloyd Sent: Friday, March 12, 2010 11:05 AM To: help-cfengine@cfengine.org Subject: RE: splitting a "blank" li

RE: canonify promise_repaired

2010-03-16 Thread Justin Lloyd
Neil, I've been trying to do something similar and have a ticket open. However, you're doing this in an agent bundle and I'm doing it in a common bundle, and I'm told that the common bundles do the expansion differently from agent bundles. Thus, moving my class creation into an agent bundle may

RE: canonify promise_repaired

2010-03-16 Thread Justin Lloyd
egal characters Promise (version not specified) belongs to bundle 'test' in file './test.example.cf' near line 17 !! Class identifier contains illegal characters Promise (version not specified) belongs to bundle 'test' in file './test.example.cf' near line 1

Deleting local accounts

2010-03-17 Thread Justin Lloyd
Does anyone have a bundle or set of promises for deleting a local Unix account? I'm thinking about how to approach this cleanly, including removing the user from any groups in /etc/group. I thought about using systems' native commands (e.g. userdel, passmgmt, pwck, pwconv, etc.) but there can be od

Retrieving certain files from a directory

2010-03-17 Thread Justin Lloyd
Ok, I'm stumped again. I've been working on a problem for hours. I want to effectively do the following on each client: client# scp policy_host:/usr/local/etc/*.rc /usr/local/etc but I can't figure out how to set up the access rules and files promise. I keep getting either access errors or a copy

RE: Deleting local accounts

2010-03-17 Thread Justin Lloyd
Ok, it does seem best, then to roll my own solution. Thanks for the feedback, all. Justin -Original Message- From: Mark Burgess [mailto:mark.burg...@iu.hio.no] Sent: Wednesday, March 17, 2010 11:27 AM To: nwat...@symcor.com Cc: Justin Lloyd; help-cfengine@cfengine.org; help-cfengine

RE: Retrieving certain files from a directory

2010-03-18 Thread Justin Lloyd
earch body, though my just did recursion even though it wasn't necessary, but now I don't think that was part of the problem. Thanks! Justin -Original Message- From: Nakarin Phooripoom [mailto:mynameisje...@gmail.com] Sent: Thursday, March 18, 2010 4:06 AM To: Justin Lloyd Cc: help-c

RE: Retrieving certain files from a directory

2010-03-18 Thread Justin Lloyd
23:37, Justin Lloyd wrote: > > Ok, I'm stumped again. I've been working on a problem for hours. I want > to effectively do the following on each client: > > client# scp policy_host:/usr/local/etc/*.rc /usr/local/etc > > but I can't figure out how to set up the access

RE: Retrieving certain files from a directory

2010-03-18 Thread Justin Lloyd
It looks like Nakarin's suggestion has fixed my problem. To your question, however, I had decided when writing my original email not to submit an example of what I'd tried in this case for a couple of reasons. One was that I had gone through so many iterations and configurations that it was hard to

RE: Retrieving certain files from a directory

2010-03-18 Thread Justin Lloyd
n why the trailing "/." is needed on the directory for the files promise but not on the directory for the server access promise. That seems to be an unnecessary inconsistency. Justin -Original Message- From: help-cfengine-boun...@cfengine.org [mailto:help-cfengine-boun...@cf

RE: Retrieving certain files from a directory

2010-03-18 Thread Justin Lloyd
riginal Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Thursday, March 18, 2010 12:25 PM To: Justin Lloyd Cc: help-cfengine@cfengine.org; help-cfengine-boun...@cfengine.org; Nakarin Phooripoom Subject: RE: Retrieving certain files from a directory help-cfengine-boun...@cfen

RE: Cfengine Help (Mailing list): Re: How to remove clients fromcfengine 3 reports?

2010-03-19 Thread Justin Lloyd
Neil, I don't understand the distinction you're trying to make. The policy server calls the hostsseen() function and then has files promise to fetch two files, fluctuations.nov and mean_field.nov, from every host in the slist returned from hostsseen using the remote_cp copy_from body. This is d

  1   2   >