Forum Discussion
Bigip_device_info for ltm-policies doesn't have an action of forward
- Aug 31, 2022
There you go!
So you can use the bigip command module in our ansible to pass the tmsh parameters in and grep for those 2 pools.
Thank you for your reply but I'm not sure those solutions will help. I'm pulling the bigip_device_info based on a virtual-server then I'm parsing the policy name and getting the facts for the policy also using the bigip_device_info. The issue is that subset of the ltm-policy fact from the bigip_device_info module doesn't provide a way to get the pools we are forwarding to. i have to be able to find the pools associated with the access policy without know what the pool name are which is why I'm using the facts.
This is what I'm doing.
- name: json_query - VIP address
set_fact:
vip_result: "{{ bigip_facts.virtual_servers|default({}) | json_query(jmesquery) }}"
vars:
jmesquery: "[?destination=='/Common/{{ item.destination_address }}:{{ item.destination_port }}'].{virtual_name: name, destination_address: destination_address, destination_port: destination_port, snat_pool: snat_pool, default_pool: default_pool, persistence_profile: persistence_profile, profiles: profiles[*].{context: context,name: name}, policy_name: policies[*], irules: irules[*], virtual_state: availability_status virtual_enabled: enabled}"
loop: "{{ vip }}"
- name: json_query - Policy
set_fact:
policy_result: "{{ vip_result[0].policy_name }}"
loop: "{{ vip }}"
- name: json_query - Policy Details
set_fact:
policy_details: "{{ bigip_facts.ltm_policies|default({}) | json_query(jmesquery) }}"
vars:
jmesquery: "[?full_path=='{{policy_result}}']"
when: vip_result[0].policy_name is defined
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com