-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a module to add/remove items from datagroup? #2352
Comments
Hi @AndrewSav, Have you tried using AS3 and Ansible declarative collection? AS3 data group documentation: |
@pgouband, no I have not tried using that. Is there a module for that in this imperative collection? In the declarative collection is there a module that is specifically made for writing to data groups? |
Hi @AndrewSav, Here the link for data group module in imperative collection: In declarative collection, there is no module as data group can be managed via AS3. |
@pgouband thank you for that. Does that module allow to add or remove individual records in a datagroup? That should be quite a common use case, but by reading this documentation I do not see a way of removing a single record. I'm currently doing something like this:
Which gives the aforementioned warning. What is the right way to do this then? |
Hi @AndrewSav, You can use bigip_as3_deploy module from declarative collection: Here an example. as3-dg.yml file - hosts: all
collections:
- f5networks.f5_bigip
connection: httpapi
vars:
ansible_host: "X.X.X.X"
ansible_user: "admin"
ansible_httpapi_password: "mysecretpassword"
ansible_network_os: f5networks.f5_bigip.bigip
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
tasks:
- name: Data group
bigip_as3_deploy:
content: "{{ lookup('file', 'as3-dg.json') }}" as3-dg.json file
as3-dg.json file after removing one entry.
|
ok @pgouband, thank you for this. From what I can see:
Do not get me wrong, I'm on board with the declarative idea - if you manage all your configuration that way with AS3 that this is the way to go. In some scenarios, you cannot commit to that and you need to do simple things to get the job done, and when you try you get the warning. I opened this issue not because I have a problem, I opened it because you (the project) asked me to via the warning. I would imagine that other people who would like to help would file the issue too. If you do not think that these issue warrant providing a requested module, may be it would be best to avoid the warning altogether, so no unnecessary time is spent looking into such issues. In any case, if you do not think that there is anything here to be done, I'm happy to close this. Please let me know. |
I was not able to find a module that adds or removes items to/form datagroups. Running the generic command to do that gives the warning above and asks to file a bug. Did I miss the module?
The text was updated successfully, but these errors were encountered: