Questions tagged [cfengine]

CFEngine is a configuration management tool.

CFEngine is a configuration management tool that allows you to automate system configuration and administration. It is lightweight and scalable. CFEngine 3 is a completely redone version of the tool, with a new configuration language that makes it easier to extend and use the language.

41 questions
2
votes
2 answers

CFEngine - applying separate policies to different servers

I'm looking at using CFEngine on some linux servers. My problem is that I need to be able to apply separate policys depending on the server. I looked all over their documentation, and I cannot find anywhere that says that that can or cannot be…
Azzie Rogers
  • 125
  • 4
2
votes
1 answer

Aggregating emails from cron and cfengine

I've recently taken over administration of a decent size network (900 FreeBSD or Linux hosts across 10 physical sites) where we get a lot of email destined for root, mostly from cfengine (v2). We've also installed a lot of cron jobs over the years,…
Patrick
  • 435
  • 1
  • 4
  • 9
2
votes
1 answer

Syntax check cfengine files before updating git repository

I have my cfengine (2 and 3) files in a git repository fronted by gitolite. Users of this repo have a pre-commit hook that will perform syntax/promise checks on the files as needed. This works fine. To protect against someone not having the…
MarkD
  • 123
  • 4
2
votes
6 answers

How to edit /etc/shadow on many Linux servers?

I would like to change the root password on about 20 Linux servers. Mostly CentOS and Ubuntu. So I have looked at Puppet, chef, and cfengine, but I can't really tell if they can do that, or if they would be over kill for the task? Does anyone have…
Sandra
  • 10,303
  • 38
  • 112
  • 165
2
votes
1 answer

Can I pass the LHS of a cfengine3 processes: line to the RHS?

I'm using cfengine to start the foobar process. Apparently the LHS is discarded when I use process_select? Can I simply pass the LHS to a function, rather than having to put the command match pattern in a body argument? I wanted to only match foobar…
joeforker
  • 2,399
  • 4
  • 26
  • 35
2
votes
2 answers

How do I read a pid file in cfengine?

How do I read a pid file in cfengine 3 and restart that process if it isn't running?
joeforker
  • 2,399
  • 4
  • 26
  • 35
2
votes
2 answers

How do I add a low_disk_space class to cfengine3 if my disk is more than 90% full?

I would like to set a class in cfengine3 so I can perform an action if the disk is almost full.
joeforker
  • 2,399
  • 4
  • 26
  • 35
1
vote
1 answer

Soft dependency in systemd

I am trying to understand if there is a way to create a soft dependency between systemd services. Basically, I'd like to create an "umbrella" service that starts other services marked as (soft-) dependencies, but if and only if they are enabled --…
bronto
  • 121
  • 11
1
vote
1 answer

how to stagger scheduled cfengine tasks based on hostname

I'm trying to execute a scheduled task on a large-ish pool of virtual servers, but I want to minimize the resulting performance impact on the hypervisor, ideally executing it on one server at a time. Think something like this: …
lubomir.brindza
  • 256
  • 3
  • 10
1
vote
1 answer

cf-agent Error: "Unexpected argument with no preceding option"

I've installed CFEngine on my policy server and host, according to the documentation here: https://docs.cfengine.com/docs/3.5/getting-started-installation-installing-community.html When I run the command /var/cfengine/bin/cf-agent -B 10.0.0.253 to…
norway-firemen
  • 143
  • 1
  • 1
  • 4
1
vote
1 answer

Cfengine Perform action based on variable value

In cfengine, I have a variable that is set to the output of a command. Let say variable myoutput is set to "hi world". How can I execute a command based on the contents of myoutput. I would like to do something like this (sudo cfengine…
Daniel
  • 251
  • 4
  • 12
1
vote
2 answers

How the particular client pull the policy from the cfengine server

I am working on the CFEngine, but i am newbie to this concept. for my requirement i am using single server and i am using 10 clients, now all the ten clients pull the policy from the server and executing the polices. But my requirement is, the…
Ashok
  • 11
  • 1
1
vote
4 answers

cfengine 3 policies slow update to clients

My problem: cfengine3 policies are manually created/updated on the server (policy hub), and the clients regularly (every ~ 5 minutes) pull those from the server:/var/cfengine/masterfiles to their respective someclient:/var/cfengine/inputs (as they…
David Ramirez
  • 407
  • 2
  • 4
  • 19
1
vote
2 answers

cf3 Can't stat ... in files.copyfrom promise

On the client: # cf-agent -KIv ... cf3 -> Handling file existence constraints on /etc/cfengine3 cf3 -> Copy file /etc/cfengine3 from /srv/cfengine/sysconf/server/inputs check cf3 No existing connection to 172.31.69.83 is established... cf3 Set…
khosrow
  • 4,163
  • 3
  • 27
  • 33
1
vote
1 answer

How do I configure cfengine3 to e-mail me when / has less than 10GB free?

I'd like to get a notification when my server's free disk space drops below 10GB. How do I configure cfengine3 to tell me when / has less than 10GB of free space?
joeforker
  • 2,399
  • 4
  • 26
  • 35