-
Notifications
You must be signed in to change notification settings - Fork 233
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
Unable to delete external Data Group File List via automation #2414
Comments
Hi @f5killer, Are you using bigip_data_group? With state absent? |
It works well in internal data group but external doesn't work.. Playbook will pass but still you will find external data group here. is there any solutions? |
Hi @f5killer, Not sure I understand your issue. |
Playbook works well with external datagroup but ifile never delete. Not sure if i am doing wrong
|
Hi @f5killer, Have you tried with 'state: absent'? When state is present, ensures the data group exists. So it should look like:
|
I feel its bug. Find the below code which i am using along with -vvv
ok: [x.x.x.x -> localhost] => { Device Output: I feel this is bug as F5 GUI file name shows ip_list_entry but cli file name append with prefix and postfix :Common:ip_list_entry_80553_1 Thank you |
Hi @f5killer, Can you try to delete the datagroup without specifying the filename? |
Still the same result. I feel ansible-python library need to review.. Can you please ask someone to review.. in next version also some module will be used. |
Hi @f5killer, I was able to delete a datagroup (external) using the following playbook.
$ ansible-playbook -i hosts dg2.yml
PLAY [all] *******************************************************************************************************************************************************************************
TASK [create DG] *************************************************************************************************************************************************************************
ok: [10.10.10.9 -> localhost]
PLAY RECAP *******************************************************************************************************************************************************************************
10.10.10.9 : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |
Its not working for me. May be i am not explaning clearly. To reproduce issue, I would suggets you upload file under
upload multiple file in external System ›› File Management : Data Group File test-dg_1, test-dg_2, test-dg_3 with different ip address. Later change the irule reference datagroup from test-dg to test-dg_1, test-dg_2 and final will be in iRule test-dg_3 Now delete unused datagroup test-dg, test-dg_1, test-dg_2 via ansible f5networks.f5_modules.bigip_data_group, you will find that ansible execute all but actaul datagroup remain there. Device Output: I feel this is bug as F5 GUI file name shows ip_list_entry but cli file name append with prefix and postfix :Common:ip_list_entry_80553_1 if you don't observe issue.. Best of Luck |
Hi @f5killer, I did all you asked and datagroup are deleted (in the GUI Local Traffic >> iRules : Data Group List).
$ ansible-playbook -i hosts dg3.yml
PLAY [all] *********************************************************************
TASK [delete DG] ***************************************************************
changed: [10.10.10.9 -> localhost]
TASK [delete DG_1] *************************************************************
changed: [10.10.10.9 -> localhost]
TASK [delete DG_2] *************************************************************
changed: [10.10.10.9 -> localhost]
PLAY RECAP *********************************************************************
10.10.10.9 : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 |
It mean you are able to delete file from external data group via above script? No or YES |
Hi @f5killer, There are 2 components of a Data Group (external):
In the GUI if you delete LTM config object, system file is not deleted. Using the playbook, I was able to delete LTM config object but not the file but again Ansible module is behaving like GUI. |
Would you like suggest out of box idea or bug/improvement? |
Hi @f5killer, You can use bigip_command module to delete the file after deleting Data Group LTM object.
|
This is just workaround but i think 'bigip_data_group' module must be reviewed. External files 'external_file_name' parameter has added, which works for upload but never works for remove. Thanks |
Hi @f5killer, Ansible is behaving like GUI so no the module will not be modified. |
I stuck in one of the automation case. It nightmare since long time. Can help to advice is there any automation way to delete Data Group File List from File Management.
COMPONENT NAME
System ›› File Management : Data Group File List
Environment
F5 v14, v15, v16
ANSIBLE VERSION
BIGIP VERSION
CONFIGURATION
OS / ENVIRONMENT
BIG-IP 16.1.4.1 Build 0
SUMMARY
Can help to advice is there any automation way to delete Data Group File List from File Management.
We have many unused file under System ›› File Management : Data Group File List, wanted to add automate deleation via ansible or python. Please suggest best approach. for reference this is locations.
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: