F5Networks / f5-ansible-bigip

Declarative Ansible collection for managing F5 BIG-IP/BIG-IQ.
37 stars 17 forks source link

bigip_config: merge_content expects file instead of str #64

Closed simonkowallik closed 1 year ago

simonkowallik commented 1 year ago
COMPONENT NAME

bigip_config version 2.0.0

Environment

ANSIBLE VERSION
latest
BIGIP VERSION
16.1.3.4
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

bigip_config seems to expect a path to a file in the merge_content parameter. This is odd because a) the f5_modules.bigip_config merge_content parameter did expect a string and b) this does not allow to use jinja2 to define the actual configuration to be merged. The parameter name also indicates it expects "content" instead of a path to a file on the filesystem.

The examples are broken but seem to inidicate a file has to be read by any ansible function turning it into "content" (str):

https://github.com/F5Networks/f5-ansible-bigip/blob/df5d60134cd8f280eb1ed78182b44b28f744f9be/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_config.py#L116-L129

STEPS TO REPRODUCE
EXPECTED RESULTS

The module parameter should accept str as input, similar to f5_modules.bigip_config

ACTUAL RESULTS
wojtek0806 commented 1 year ago

This is working as intended, it was a result of a change to the bigip_config as a whole.

While we try to maintain 1:1 relation between imperative (f5_modules) and declarative (f5_bigip) collection modules, we won't guarantee it every time. Users should always refer to documentation if in doubt, not all modules will be interchangeable between imperative and declarative collections.