Forum: CFEngine Help Subject: BUG ? Whitespace policy not honored Author: jbdenis Link to topic: https://cfengine.com/forum/read.php?3,26542,26542#msg-26542
Hello, I'm using CFEngine Core 3.3.4. The whitespace policy is not honored in this example (gist) : body common control { bundlesequence => { example }; inputs => { "cfengine_stdlib.cf" }; } bundle agent example { files: "/tmp/myfile" edit_line => addline, create => "true"; } bundle edit_line addline { insert_lines: "0,5,10,15,20,25,30,35,40,45,50,55" whitespace_policy => { "ignore_trailing", "ignore_embedded", "ignore_leading" }; } If I execute the promise twice (and add some spaces before the second run), the file is edited twice :/ # cf-agent -KI -f ./example.cf -> Created file /tmp/myfile, mode = 600 -> Edited file /tmp/myfile # cat /tmp/myfile 0,5,10,15,20,25,30,35,40,45,50,55 # (some edition of /tmp/myfile) # cat /tmp/myfile 0,5,10, 15, 20 ,25, 30,35,40,45,50,55 # cf-agent -KI -f ./example.cf -> Edited file /tmp/myfile # cat /tmp/myfile 0,5,10, 15, 20 ,25, 30,35,40,45,50,55 0,5,10,15,20,25,30,35,40,45,50,55 Sigh... Do yo you confirm this (very) boring bug or am I doing something wrong here ? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine