F5Networks / f5-ansible

Imperative Ansible modules for F5 BIG-IP products
GNU General Public License v3.0
376 stars 229 forks source link

Module for configuring BIG-IP LTM Analytics Profile #784

Closed tdm00 closed 5 years ago

tdm00 commented 6 years ago
ISSUE TYPE
COMPONENT NAME

There doesn't appear to be a module specifically made for creating analytics profiles when AVR is provisioned on a BIG-IP to provide idempotency. Perhaps bigip_profile_analytics?

ANSIBLE VERSION
ansible 2.6.1
  config file = /var/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
PYTHON VERSION
Python 2.7.15rc1
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     13.1.0.7
  Build       0.0.1
  Edition     Point Release 7
  Date        Tue May 15 15:26:30 PDT 2018
LIBRARY VERSIONS
bigsuds==1.0.6
f5-sdk==3.0.17
CONFIGURATION
N/A
OS / ENVIRONMENT
N/A
SUMMARY

Add a module that allows for idempotency for /ltm profile analytics profiles.

STEPS TO REPRODUCE
- name: AVR Logging Profile and settings
  bigip_command:
    commands:
      - create /ltm profile analytics my_analytics {
            app-service none
            collect-geo enabled
            collect-ip enabled
            collect-max-tps-and-throughput enabled
            collect-page-load-time enabled
            collect-url enabled
            collect-user-agent enabled
            collect-user-sessions enabled
            collected-stats-external-logging enabled
            collected-stats-internal-logging enabled
            defaults-from analytics
            description "Analytics Testing Policy"
            external-logging-publisher loginsight_avr_publisher
            notification-by-syslog enabled
            notification-email-addresses none
            traffic-capture replace-all-with { capturing-for-my_analytics { } }
       }
  delegate_to: localhost
EXPECTED RESULTS

Creation of the profile, if needed, otherwise the task would be not changed.

ACTUAL RESULTS
caphrim007 commented 6 years ago

for reference, there are two analytics profiles in TMUI; http and tcp.

This request is for the HTTP variety; /mgmt/tm/ltm/profile/analytics

The other profile is at /mgmt/tm/ltm/profile/tcp-analytics