Hello,

playing around with CFEngine 3.2.3 I got the below error when trying to
update some user's authorized_keys:

In bundle agent usercreate I have the following:

...
classes:
  "create_users" expression => "ipv4_192_168_xxx";

vars:
  ### "passw" array etc.
  "users" slist => getindices("passw");

files:
  ### create passwd and shadow entries, etc.
  create_users::
    "/home/$(users)/.ssh/authorized_keys"
      copy_from =>  
local_cp("$(inputs_dir)/ssh_pubkeys/authorized_keys.$(users)"),
      perms     =>  mog("0600", "$(users)", "users"),
      classes   =>  if_repaired("authorized_keys_created");
...

sysresccd cfengine # cf-agent -IK
Non-absolute path in source attribute (have no invariant meaning): 
/home/jens/.ssh/authorized_keys
Promise (version Community Promises.cf 1.0.0) belongs to bundle 'usercreate' in 
file '/var/cfengine/inputs/users.cf' near line 71
Fatal cfengine error:


Is that a problem with CFEngine (as IMO /home/jens/.ssh/authorized_keys
is an absolute path), or am I doing something wrong and simply the
response is misleading (what I'd assume because of a lack of good
practice).

Thanks in advance for any help - cheerio

Eckard
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to