Just as reference and inspiration, there is ansible playbook for this
(build.cfengine.con had a module to run ansible playbooks)
*
https://galaxy.ansible.com/linux-system-roles/network
> <mailto:
t.d...@servicemusic.org.uk> <
t.d...@servicemusic.org.uk
> <mailto:
t.d...@servicemusic.org.uk>> wrote:
>
> Update:
>
> The "module" idea has hit a further snag, because of what seems to
> be a bug:
https://groups.google.com/g/help-cfengine/c/70qc5E83BMA
> <
https://groups.google.com/g/help-cfengine/c/70qc5E83BMA>
>
> All the Red Hat documentation about interface configuration seems to
> be about using the "nmcli" command rather than about managing the
> file. It seems they want to steer away from directly touching those
> files. But how is one supposed to manage/promise an interface
> attribute using nmcli? (I suppose one could run a command to try
> to dig out the attribute, edit the output to obtain it;
> conditionally set a class then (conditionally) apply the corrective
> command. But that seems rather more tortuous (and thus more fragile
> or error-prone) that the CFE file-line bundles such as
> "set_variable_values_ini".)
>
> So there seems no clear way forward, unless I've missed something
> obvious.
>
> -- David Lee
>
> On Thursday, 7 September 2023 at 18:21:52 UTC+1
> * Create a generic data structure, munge the data as
> necessary for |redhat_8| or |redhat_9| so that the keys
> and values are convenient for rendering the file content
> * Model on the structure needed for |redhat_8|, munge for
> |redhat_9| so that the keys and values are convenient
> for rendering the file content
> * Model on the structure needed for |redhat_9|, munge for
> |redhat_8| so that the keys and values are convenient
> for rendering the file content
>
> This munging may be achievable directly in policy, or it
> might make sense to hand the source data off to a module and
> do the necessary munging using a higher level language.
>
> With respect to the INI format, I believe that there still
> exists an issue with respect to being able to select the
> /last/ section using |edit_line| (should have been resolved
> with
https://northerntech.atlassian.net/browse/CFE-452
> <
https://northerntech.atlassian.net/browse/CFE-452>, but
> <
https://northerntech.atlassian.net/browse/CFE-3428>,
>
https://northerntech.atlassian.net/browse/CFE-2663
> <
https://northerntech.atlassian.net/browse/CFE-2663>) so
> that will complicate doing partial file management, but if
> you are managing the full file content and know everything
> you want, then you should be able to render the INI via
> mustache.
>
> --
> You received this message because you are subscribed to the Google
> Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
help-cfengin...@googlegroups.com
> <mailto:
help-cfengin...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/help-cfengine/9cdee544-012f-4dca-94de-74c6a16a1074n%40googlegroups.com <
https://groups.google.com/d/msgid/help-cfengine/9cdee544-012f-4dca-94de-74c6a16a1074n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "help-cfengine" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
help-cfengin...@googlegroups.com
> <mailto:
help-cfengin...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/help-cfengine/CANNWuVWrXxFyGOCar0CsqML9tr3ODoc2yXAbVBQpZsRDh%2Bsffg%40mail.gmail.com <
https://groups.google.com/d/msgid/help-cfengine/CANNWuVWrXxFyGOCar0CsqML9tr3ODoc2yXAbVBQpZsRDh%2Bsffg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
--
Bas van der Vlies
| High Performance Computing & Visualization | SURF| Science Park 140 |
1098 XG Amsterdam
| T
+31 (0) 20 800 1300 |
bas.van...@surf.nl |
www.surf.nl |