Any plans to have MAC addresses in $(sys)?

2010-05-14 Thread Сева Глущенко
Dear Mark, have you got any plans to implement $(sys.mac[$(interface)])? It might be very nice addition to sys.ipv4 thing. -- SY, Seva Gluschenko. ___ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfen

Re: duplicate selection of value

2010-05-13 Thread Сева Глущенко
The following promise "myarray[$(mykeys)]" string => execresult("/usr/bin/ps -f | grep $(mylist[$(mykeys)])","useshell"); will expand not the way you expecting it. It doesn't mean "myarray[a]" string => execresult("/usr/bin/ps -f | grep $(mylist[a])","useshell"); "myarray[b]" string => execresul

Re: Trusting a server's public key

2010-05-13 Thread Сева Глущенко
Justin, it seems like your task can be performed as follows: files: "$(root_homedir)/.ssh/lum.pub" copy_from => remote_copy_with_backup("/root/.ssh/id_rsa.pub", "lum"); "$(root_homedir)/.ssh/authorized_keys" edit_line => insert_file("$(root_homedir)/.ssh/lum.pub");

Re: Deleting unwanted packages

2010-05-07 Thread Сева Глущенко
Marc, at the first glance it looks like getting installed packages can be simplified a bit: bundle agent packages { vars: "pkg_list" string => execresult("/usr/bin/dpkg -l | /usr/bin/awk '/^ii/ {print $2}'", "useshell"); "installed" string => splitstring("$(pkg_list)", "[\n]" , "1")

Re: defining classes

2010-05-05 Thread Сева Глущенко
Hello Sandra, First of all, common bundles don't need to be included into the bundlesequence. Next, the whole policy_hosts construction looks dubious. What did it mean to be, compound match or single? The following would fit better: classes: "policy_hosts" expression => "cfengine_domain_com

cf-twin?

2010-04-28 Thread Сева Глущенко
Hello folks, The CFengine which has been newly installed from cfengine-community-3.0.4p2-1.centos5.i386.rpm complains: Apr 28 11:25:21 localhost cf-execd[7323]: Proposed executable file "/var/cfengine/bin/cf-twin" doesn't exist but cf-twin isn't included in the package. Is it a bug or something

ifvarclass when file does NOT exist

2010-04-23 Thread Сева Глущенко
Hello folks, I'm trying to make a promise which creates files when their counterparts not exist yet. But when I'm writing something like compile:: "$(base)/(.*)/.compile" create => "true", ifvarclass => !canonify(fileexists("$(dst)/$(match.1)

anybody succeed with installing FreeBSD packages locally?

2010-04-21 Thread Сева Глущенко
Hello folks, I'm tryin' to build a Cfengine method which installs locally available packages. Unfortunately, it seems like pkg_add ignores PKG_PATH environment variable despite it is listed in its manual page and "strings /usr/sbin/pkg_add" command output. So, is there anybody who succeed with thi

local packages installation, isdir() and fileexists()

2010-04-19 Thread Сева Глущенко
Hello folks, I'm trying to implement the following policy on FreeBSD box: - let's try to install a package from the default repo - upon failure copy a custom copy of a package from cfengine policy host and install it locally Things which stop me are: 1. There's no obvious way to define a class if

help-cfengine@cfengine.org

2010-04-12 Thread Сева Глущенко
Hi guys, I run into troubles trying to invoke cf-runagent from the master server. Remote reports as follows: cf3 -> Unexpected argument with no preceding option: && Both exec_command in body agent control and cfruncommand in body runagent control are defined as follows: "$(sys.cf_agent) -f fai

is it possible to combine arrays and lists?

2010-04-07 Thread Сева Глущенко
Hi guys, Trying to implement templated keepalived configuration, I've found that it is impossible to iterate over a list in an array element. The following example vars: "ip[R1]" ilist => { "1", "2", "3" }; "ip[R2]" ilist => { "4", "5", "6" }; "r_id"string => "R1"; reports:

CentOS and lsb-release call

2010-04-01 Thread Сева Глущенко
Hello guys, The cf-execd from the cfengine-community-3.0.4-1.centos5.i386.rpm complains to /var/log/messages: Apr 1 17:53:11 eth0 cf-execd[29850]: !!! System error for execv: "No such file or directory" Apr 1 17:54:11 eth0 cf-execd[29950]: Couldn't run /usr/bin/lsb_release Apr 1 17:54:11 et

iteration problem with execresult string assignment

2010-03-30 Thread Сева Глущенко
Hello guys, The following bundle cause iteration problems. Could anybody advise how to rewrite it to omit them? bundle agent system_startup(service) { vars: centos:: "status"string => execresult("/sbin/chkconfig --list

variables expansion in edit_line

2010-03-29 Thread Сева Глущенко
Hello folks, I'm stuck with the variables expansion. Maybe somebody can explain me what's going on? Here is the test bundle: ### bundle common g { vars: "crontab" string => "/etc/crontab"; } body common control { bundles

Re: Cfengine Help: methods and undeclared bundles

2010-03-24 Thread Сева Глущенко
body common control { ignore_missing_bundles => "true"; } 2010/3/24 : > Forum: Cfengine Help > Subject: methods and undeclared bundles > Author: matter > Link to topic: https://cfengine.com/forum/read.php?3,16646,16646#msg-16646 > > Greetings, > > I would like to use usebundle to run a bundle,

Duplicate selection of value for variable "start_cmd" in scope start_service

2010-03-24 Thread Сева Глущенко
Hello guys, I have a promise bundle which controls two daemons. They are described as follows: vars: "services" slist =>{ "daemon", "another_daemon" }; methods: "$(services)" usebundle => start_service("$(services)"), comment

any good abstract solution for action upon file change?

2010-03-23 Thread Сева Глущенко
Hello guys, I'm new to this list and new to the cfengine either. Working out ways to deploy the community version, I'm getting stuck with limitations sourced by "classes not variables" paradigm. For example, currently I have such a case for a mailserver controls: bundle agent mailmaps { vars: