Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: SteveJake
Link to topic: https://cfengine.com/forum/read.php?3,27049,27068#msg-27068
That's pretty close to what our fallback position is. Reading into arrays runs
into a couple of limitations relating to performance and the
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27049,27067#msg-27067
Be careful with this. The agent has a hard limit for variable size. The files
might be too large.
__
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: sauer
Link to topic: https://cfengine.com/forum/read.php?3,27049,27063#msg-27063
Is it out of the question to read each file into an array, and use an
insert_lines promise with preserve_block to ensure that each file be added?
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: SteveJake
Link to topic: https://cfengine.com/forum/read.php?3,27049,27062#msg-27062
So, /etc/hosts is just an example file. We're looking for a mechanism to do
this for a number of different config files.Edit_lines promi
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27049,27061#msg-27061
Now the truth comes out ;). This is why we like to focus on why you need
something rather than what you need. You have multiple files cont
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: SteveJake
Link to topic: https://cfengine.com/forum/read.php?3,27049,27060#msg-27060
Thanks Neil,
I've looked at templates, but they don't quite meet the need here. We've built
a model where we use the existence of a file wi
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27049,27054#msg-27054
Try this first as it might be easier:
http://cfengine.com/manuals/cf3-Reference#edit_005ftemplate-in-files
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: SteveJake
Link to topic: https://cfengine.com/forum/read.php?3,27049,27053#msg-27053
What would that look like in a cf file? How do I append the file with separate
file promises?
thanks!
-steve j
__
Forum: CFEngine Help
Subject: Re: Concatenating multiple files
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,27049,27052#msg-27052
You could apped the file with separate file promises based on classes. Perhaps
the base promise would empty first. Another option would be