It's possible combinate augeas & template?. The objective its a static part of test inside a file an another variable with the augeas. I'm reading the documentation and examples but I think its not possible. If its possible, can you put an example? thanks
Asked
Active
Viewed 355 times
1 Answers
1
If you manage a file with the file
type, you need to manage it entirely and you cannot manage parts of it with another type, such as augeas
. In order to manage files by parts, you may want to consider using one of the concat modules instead (Puppet Labs' or Onyxpoint's)

raphink
- 3,625
- 1
- 28
- 39
-
yes, but I need maintain the file because any persorn change this file – runouri Jul 10 '14 at 11:26
-
I'm not sure to understand: do you want to manage the whole file in order to prevent local changes, or do you want to allow local changes? – raphink Jul 12 '14 at 16:46
-
The objective its modify the file with puppet and prevent the changes from other users. With Augeas I can modify the file if user delete the parameters introduced with augeas, puppet writte again, but the user writea new line for exemple, puppet don't delete it. – runouri Jul 14 '14 at 10:24
-
Ok, so you need to manage the file entirely. The possible approaches are: a `file` resource with a template; a `concat` resource (either Puppet Labs' or OnyxPoint's) or a native type (see augeasproviders.com for example) with purging (using the `resources` resouce type). – raphink Jul 14 '14 at 16:34