f5-ansible icon indicating copy to clipboard operation
f5-ansible copied to clipboard

Ansible module to associate traffic-group-local-only Traffic Group with a partition created prior (e.g., LOCAL_ONLY)

Open ab-gmbh opened this issue 5 years ago • 3 comments

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

bigip_device_traffic_group

ANSIBLE VERSION
2.9
PYTHON VERSION
2.7.16
BIGIP VERSION
15.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

The current module does not allow the 'traffic-group-local-only' to be associated with a partition created prior.

STEPS TO REPRODUCE
- name: Associate local traffic group to LOCAL_ONLY partition
      bigip_device_traffic_group:
        name: traffic-group-local-only
        partition: LOCAL_ONLY
        provider: "{{ bigip_provider }}"
      delegate_to: localhost
EXPECTED RESULTS

traffic-group-local-only to be associated with LOCAL_ONLY partition

ACTUAL RESULTS
TASK [Associate local traffic group to LOCAL_ONLY partition] **************************************************************************************
task path: /Users/chzhang/Documents/abgmbh/halab/bigips.yaml:59
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Traffic groups can only be created in the /Common partition"}
 

ab-gmbh avatar Oct 28 '20 05:10 ab-gmbh

Will you please elaborate on the use case here. It is common for a LOCAL_ONLY partition to be created which references the traffiic-group "traffic-group-local-only". This issue is trying to perform the opposite.

focrensh avatar Oct 30 '20 21:10 focrensh

It is common for a LOCAL_ONLY partition to be created which references the traffiic-group "traffic-group-local-only".

This is not happening with the Ansible module being tested.

The user case is using Ansible for HA configuration in AWS. The default gateway on each of the F5's cannot be synced to the other as the F5's are on completely different subnets.

ghost avatar Nov 01 '20 23:11 ghost

Association to of a traffic-group to a partition is done when creating the partition, not the traffic group. The intent of this module is for creating new traffic-groups which is restricted to Common. After the traffic-group is created, you can then reference it when creating a new partition. I believe that traffic-group-local-only should exist on BIG-IP by default, so that part is already done.

We should highlight that the create user partition LOCAL_ONLY and create folder LOCAL_ONLY are different. This module is associated with the API endpoint for partition and not folder which is what contains the ability to associate traffic-groups.

We do have a module for partition creation: https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/bigip_partition_module.html#bigip-partition-module

This screen shot in the TMUI actually runs

create { folder { folder_name "/LOCAL_ONLY" folder_traffic_group "/Common/traffic-group-local-only" folder_devicegroup "default" folder_description "" } }

image

It seems that we would need to handle the association to the partition behind the scenes based on an RFE or add a new module for folder management which contains the parameter for traffic-group.

Would this logic handle the use case?

focrensh avatar Nov 02 '20 18:11 focrensh

Closing this now. Reopen if you still face the issue. Thanks!

KrithikaChidambaram avatar Dec 08 '22 18:12 KrithikaChidambaram