Hi all. I haven’t submitted to ansible before and need a bit of guidance if anyone’s got time!
My actual change is to add a single parameter in the vyos.vyos collection, and is only a few lines. But to get to the point, for updates to the vyos.vyos collection:
should I use ‘Resource module builder’ or CLI_RM_BUILDER; and
If it’s CLI_RM_BUILDER, does it still use the models repository, or something else?
CLI_RM_BUILDER is the right tool to use to build a model or add keys or delete keys.
Please refer to this doc. The documentation work for cli_rm_builder tool is still in progress.
Let me know if anything is not clear with respect to cli_rm_builder tool usage.
Hi Gomathi. I’ve finally got back to this! when I run cli_rm_builder against the existing vyos.firewall_rules module (or my modified version), it fails with an error. The problem is when ‘convert_doc_to_ansible_module_kwargs’ calls ‘extract_argspec(doc_obj, argpsec)’, ‘extract_argspec’ tries to access the ‘options’ key, which doesn’t exist. ‘doc_obj’ contains a dictionary which has the ‘DOCUMENTATION’ key at its top level. The value of the ‘DOCUMENTATION’ key is a string containing the doc yaml. If I replace the ‘extract_argspec’ function with a version starting with the following (ie. decoding the ‘DOCUMENTATION’ string), and modify ‘convert_doc_to_ansible_module_kwargs’ to call this version, it seems to work: