Init: mediaserver

This commit is contained in:
2023-02-08 12:13:28 +01:00
parent 848bc9739c
commit f7c23d4ba9
31914 changed files with 6175775 additions and 0 deletions

View File

@@ -0,0 +1,795 @@
==============================================
F5Networks F5_Modules Collection Release Notes
==============================================
.. contents:: Topics
v1.22.0
=======
Minor Changes
-------------
- bigip_device_auth_ldap - added a new parameter referrals
- bigip_device_group - added a new parameter, asm_sync to support ASM policy synchronization
- bigip_device_group - changed full_sync, auto_sync, save_on_auto_sync parameters only to set default value during creation, to work as documented.
- bigip_device_info - add data_increment parameter for better control of data gathering from API, addresses cases where large configurations were causing token timeouts during module operation
- bigip_device_info - added option for gathering info about device license.
- bigip_monitor_http - add up_interval parameter
- bigip_policy_rule - added ASM to disable_target list
- bigip_policy_rule - added host_begins_not_with_any and host_ends_not_with_any to conditions
- bigip_profile_http- add hsts_preload parameter
- bigip_profile_tcp - add keep_alive_interval parameter
Bugfixes
--------
- bigip_monitor_dns - user can now pass route domain in the ip without error.
- bigip_monitor_external - user can now pass route domain in the ip without error.
- bigip_monitor_ftm - user can now pass route domain in the ip without error.
- bigip_monitor_gateway_icmp - user can now pass route domain in the ip without error.
- bigip_monitor_http - user can now pass route domain in the ip without error.
- bigip_monitor_https - user can now pass route domain in the ip without error.
- bigip_monitor_icmp - user can now pass route domain in the ip without error.
- bigip_monitor_ldap - user can now pass route domain in the ip without error.
- bigip_monitor_mysql - user can now pass route domain in the ip without error.
- bigip_monitor_oracle - user can now pass route domain in the ip without error.
- bigip_monitor_smtp - user can now pass route domain in the ip without error.
- bigip_monitor_tcp - user can now pass route domain in the ip without error.
- bigip_monitor_tcp_echo - user can now pass route domain in the ip without error.
- bigip_monitor_tcp_half_open - user can now pass route domain in the ip without error.
- bigip_monitor_udp - user can now pass route domain in the ip without error.
v1.21.0
=======
Bugfixes
--------
- bigip_software_image - fixed permission and ownership of the uploaded image file
- bigip_ucs - fixed permission and ownership of the ucs file
v1.20.0
=======
Minor Changes
-------------
- bigip_qkview - added a new parameter, only_create_file
Bugfixes
--------
- bigip_asm_policy_server_technology - fix issue with naming during discovery
- bigip_asm_policy_signature_set - fix issue with naming during discovery
- bigip_data_group - fixed bug discovered while updating records in internal data group
- bigip_software_install - fixed bug related to installing hotfix image on vcmp guest
v1.19.0
=======
Minor Changes
-------------
- bigip_pool - Added aliases for the parameters, monitor_type and quorum
- module_utils/teem.py - add additional telemetry data fields with relevant tests
Bugfixes
--------
- bigip_monitor_ldap - fixed bug related to password not set during create
- bigip_software_install - fixed bug related to idempotency and installation of different version of software
v1.18.0
=======
Minor Changes
-------------
- bigip_pool - add three new parameters named, min_up_members, min_up_members_action and min_up_members_checking
Bugfixes
--------
- bigip_device_info - fixed pagination bug for VLANS data
- bigip_gtm_monitor_bigip - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_external - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_firepass - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_http - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_https - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_tcp - fixed bug related to ip extraction from monitor.
- bigip_gtm_monitor_tcp_half_open - fixed bug related to ip extraction from monitor.
- bigip_monitor_dns - fixed bug related to ip extraction from monitor.
- bigip_monitor_external - fixed bug related to ip extraction from monitor.
- bigip_monitor_ftp - fixed bug related to ip extraction from monitor.
- bigip_monitor_gateway_icmp - fixed bug related to ip extraction from monitor.
- bigip_monitor_ldap - fixed bug related to ip extraction from monitor.
- bigip_monitor_mysql - fixed bug related to ip extraction from monitor.
- bigip_monitor_oracle - fixed bug related to ip extraction from monitor.
- bigip_monitor_smtp - fixed bug related to ip extraction from monitor.
- bigip_monitor_tcp - fixed bug related to ip extraction from monitor.
- bigip_monitor_udp - fixed bug related to ip extraction from monitor.
v1.17.0
=======
Minor Changes
-------------
- bigip_device_info - add fqdn related parameters to be gathered on nodes
- bigip_device_info - add parent to the data gathered for ServerSSL Profiles
Bugfixes
--------
- bigip_gtm_wide_ip - fix idempotency bugs encountered when adding/removing irules, pools and last_resort_pool
- bigip_gtm_wide_ip - irules can be added to existing gtm wide ips
- bigip_monitor_http - fixed extraction of ip from the destination value
- bigip_monitor_https - fixed extraction of ip from the destination value
- bigip_node - the fqdn_autopopulate is now only enabled when fqdn is specified.
v1.16.0
=======
Minor Changes
-------------
- bigip_device_info - add UCS creation date to the data gathered
- bigip_virtual_server - add service_down_immediate_action parameter
- bigiq_regkey_license - add addon_keys parameter to the module
Bugfixes
--------
- bigip_command - fixed a bug that interpreted a pipe symbol inside an input string as pipe used to combine commands
- bigip_device_certificate - adds missing space to tmsh command
- bigip_gtm_wide_ip - fixed inability to change persistence setting on existing wide ip objects
New Modules
-----------
- bigip_ltm_global - Manages global LTM settings
v1.15.0
=======
Minor Changes
-------------
- bigip_device_info - Added a new meta choice, packages, which groups information about as3, do, cfe and ts. This change was done to ensure users with non admin access can use this module to get information that does not require admin access.
- bigip_device_info - this module can gather information about ucs backup files.
- bigip_pool_member - add checkmode bypass so that existence checks for pool is always returns true when using check mode
- bigip_profile_http_compression - Add content_type_include parameter to bigip_profile_fastl4 module
Bugfixes
--------
- bigip_device_info - fixed bug regarding handling of negated meta options.
- bigip_device_license - fixed issue that resulted in only first of the multiple add-on keys getting added to the device.
- bigip_firewall_address_list - fixed issue where addresses that contained RD would cause an error.
- bigip_gtm_wide_ip - fixed a bug that prevented creation of gtm wide ips in disabled state.
v1.14.0
=======
Major Changes
-------------
- bigip_device_info - pagination logic has also been added to help with api stability.
- bigip_device_info - the module no longer gathers information from all partitions on device. This change will stabalize the module by gathering resources only from the given partition and prevent the module from gathering way too much information that might result in crashing.
Minor Changes
-------------
- Added no_log=True to content parameters in bigip_ssl_key and bigip_ssl_key_cert module to stop key and cert content fomr being logged.
- bigip_device_info - added stats parameter for each virtual_server resource attached to a gtm_server
Bugfixes
--------
- asm_policy_* - fixed partition filter in asm modules.
- bigip_device_info - changes cipher and cipher_group parameters to register when the actual value is 'none'.
- bigip_device_syslog - this change is done so that only unescaped " is replaced with ' in the value of include parameter.
- bigip_monitor_ldap - fixed idempotency issue with security parameter in module.
- multiple modules - Add no_log=False setting to update_password parameter in respective modules avoid false positive security warnings.
v1.13.0
=======
Bugfixes
--------
- Add auto_last_hop parameter to bigip_virtual_server module
- Fix an issue in bigip_virtual_server module that wrongly sets the partition name for profile.
- Fix issue with teem data collection where device was not ready and was returning 404 error when queried for tmos version
- fix for displaying src, checksum and other parameters when running ucs_fetch module
- fix for source capability for bigip_device_auth_ldap module
v1.12.0
=======
Minor Changes
-------------
- Add cipher_groups option to bigip_server_ssl module
- Add only_create_file option to bigip_ucs_fetch module
- Add option to overwrite existing conditons with the ones provided by user in bigip_policy_rule
- Add reverse flag support to bigip_monitor_https
Bugfixes
--------
- Add fix to iapp service update module
- Add fix to ucs module to cover more scenarios of API instability
- fix to allow tcp condition with asm_enable action
v1.11.1
=======
Bugfixes
--------
- Fix API filters not returning correct results when policy names ending with numbers
- Fix a name/address comparison logic when using aggregates in bigip_pool_member
- Fix a regression introduced to aggregate component of bigip_pool_member
- Fix detaching of attached AFM policy to created route domain
- Fix for Virtual server idempotency with non-common partition.
- Fix for adding sip profile to Virtual server
- Remove type str for datagroups as we are not supporting it.
- fix destination re in bigip_device_info misses shared partition.
v1.11.0
=======
Bugfixes
--------
- Add syn_cookie_enable parameter to bigip_profile_fastl4 module
- Fix for bigip_firewall_rule not idempotent when using address_list as source or destination
- Fix for bigip_software_install module with state activated
- Fix for inactive volume handling issue for bigip_software_install module
- Fix snat pool issue in device info module
- Include serialNumber for ssl-certs gather_subset
v1.10.1
=======
Bugfixes
--------
- Fix teem call when bigip_command and bigip_wait modules are using CLI as transport
v1.10.0
=======
Minor Changes
-------------
- Add address_matches_with_external_datagroup condition to bigip_policy_rule module
- Add persistence target for disable action to bigip_policy_rule module
- Add rule_order parameter to bigip_policy_rule module
Bugfixes
--------
- Add negate as3,do,ts,cfe filter for bigip_device_info
- Fix asm policy stats to return complete info in bigip_device_info module
- Fix bigip_device_info with correct attribute "insert_xforwarded_for"
- Fix ignoring of partition parameter when creating external datagroups
- Fix incorrect duplication of entries when creating new ACLs
- Fix index out of range error when comparing user and device's ACLs
- Fix ltm policy conditions to return complete data in bigip_device_info module
- Fix query filters in bigip_asm_* modules to allow policy names subsets
v1.9.1
======
Minor Changes
-------------
- Add ENV variable with better name, it should make it easier to understand when disabling F5 TEEM telemetry
- Add new choices to request/response chunking parameter to accomodate TMOS v15 and above
Bugfixes
--------
- Disable cert validaton for Teem
- Fix bigip_gtm_wide_ip to support wildcard type a wide ips
- Fix bigiq non local provider backport from f5_bigip collection
- Fix for bigip_data_group accepts address object without value
- Fix for bigip_pool_member aggregate fails to member comparison
- Fix imish config issue where last character is chopped off by adding extra space to commands
- Fix issue in bigip_firewall_dos_policy where in TMOS v15 and above creating dos vector containers requires additional step in the API
- Fix issue in bigip_gtm_topology_region where parameter region_members being set to empty list returned an error
- Fix issue in bigip_pool_member with module idempotency when pool member status was fqdn-down
- Fix issue where bigip_firewall_port_list was failing when removing objects (#1988)
- Fix issue where empty irules property on device would throw exception during comparison
- Fix issue where viprion platrform interfaces interface naming scheme prevented the use of module
- Fix issue with new telemetry environment variable not populated in provider
- Fix issue with send_teem function ignoring environment variable
- Fix teem version in constants.py
- Fix validation function for bigip_virtual_server module to include new api endpoints for checking SIP profiles
- Fix various minor regressions and improved functional testing in collection
v1.9.0
======
Minor Changes
-------------
- Add token refresh handling to bigiq local client
- Added requirement to install ipaddress package for python versions earlier than 3.5
Deprecated Features
-------------------
- Support for Python versions earlier than 3.5 is being deprecated
Bugfixes
--------
- Added Fix for bigip_config check mode issue
- Fix for bigip_device_license license reactivation
- Fix for documentation bigip_data_group module doesn't check records content
- Fix issue with expired tokens causing module run to fail in bigiq_device_discovery
- Fix lookup plugin support for bigiq_license
- Fixes issues with downloading ASM policies in binary format
v1.8.0
======
Minor Changes
-------------
- Add disable action and appropriate scenarios to bigip_policy_rule module
- Add ends_with_any condition to bigip_policy_rule module
- Add http_header condition type with header_is_any condition to bigip_policy_rule module
- Add insert action and appropriate scenarios to bigip_policy_rule module
- Add path_contains condition to bigip_policy_rule module
- Add path_is_any option to conditions in bigip_policy_rule module
- Add remove action and appropriate scenarios to bigip_policy_rule module
- Add replace action and appropriate scenarios to bigip_policy_rule module
- Event types are now supported with forward type action
- Event types are now supported with reset type action
- Policy support with condition type TCP match with any of address/datagroup
Removed Features (previously deprecated)
----------------------------------------
- Removed TMOS v11 support for bigip_gtm_pool and bigip_gtm_wide_ip modules
- Removed quorum and monitor_type parameters in bigip_node module. See porting guides section at https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/porting-guides.html
- Removed syslog_settings and pool_settings parameters in bigip_log_destination moduke. See porting guides section at https://clouddocs.f5.com/products/orchestration/ansible/devel/usage/porting-guides.html
Bugfixes
--------
- Fix a bug with replace_with_all logic to consider ports in bigip_pool_member module
- Fix control characters causing url encoding errors in bigip_policy module
- Fix issue in bigip_pool_member module invwhere incorrect IF statement in function preveninv ted from reusing FQDN nodes for new pool members
- Fix issue where error messages were replaced by generic error message in bigip_device_policy module
- Fix issue with destination_address and destination_port parameters not being properly returned by bigip_device_info module
- Fix issue with removal action not allowing atomic rule updates in bigip_policy_rule module
- Fix virtual server type value displaying incorrect information in bigip_device_info module
v1.7.0
======
Major Changes
-------------
- Added async_timeout parameter to bigip_ucs_fetch module to allow customization of module wait for async interface
- Changed bigip_ucs_fetch module to use asynchronous interface when generating UCS files
Minor Changes
-------------
- Add better error handling for TEEM telemetry connection
- Changed apm_policy_fetch module to use standard download function
Bugfixes
--------
- Fix AFM firewall address list error
- Fix GTM virtual server depenedncy where path to Iapp resources were incorrectly stripped.
- Fix apm policy existence checks in bigip_apm_policy_fetch module
- Fix asm policy existence checks in bigip_asm_policy_fetch module
- Fix bigip_management_route module not idempotent
- Fix host_begins_with_any, host_is_any, server_name_is_any and host_is_not_any parameters of the bigip_policy_rule module to enforce list as the required parameter type. Change was required since in Ansible a string conversion is applied when the provided argument type is not matching the expected one causing undesired side effects.
- Fix idempotency issue with gateway_address and route domain in bigip_static_route module
- Fix issue with bigip_asm_policy_fetch where existing file would break the module run
- Fix issue with bigip_asm_policy_fetch where similiar policy names would cause wrong policy to be fetched
- Fix issue with bigip_asm_policy_manage where similiar policy names would cause wrong policy id to be selected
- Fix iteration bug in bigiq_device_info module
v1.6.0
======
Major Changes
-------------
- Add phone home Teem integration into all modules, functionality can be disabled by setting up F5_TEEM environment variable or no_f5_teem provider parameter
Minor Changes
-------------
- Add AS3 declaration information to the bigip_device_info module
- Add AS3, TS, CFE, and DO information to the bigip_device_info module
- Add CFE declaration information to the bigip_device_info module
- Add DO declaration information to the bigip_device_info module
- Add TS declaration information to the bigip_device_info module
- Add access policy information to the bigip_device_info module
- Add access profile information to the bigip_device_info module
- Add meaningful error message for the wait_for parameter in the bigip_command module
- Add parent_policies and policies_pending_changes information parameters to obtain when gathering asm-policy-stats
- Add remote_syslog information to the bigip_device_info module.
- Add renewal option to the bigip_device_license module
- Add reuse_objects parameter to the bigip_apm_policy_import module
- Add sync-status information to the bigip_device_info module
- Add the ability to import API Protection policies to the bigip_apm_policy_import module
- Added apply information parameter to indicate if an ASM policy has pending changes that need to be applied.
- Changed the meaning of policies_active and policies_inactive stat information due to changes in TMOS 13.x
- New bigip_ssl_key_cert module to manage SSL certificates and keys with the transaction interface
Removed Features (previously deprecated)
----------------------------------------
- Removed arp_state parameter from the bigip_virtual_address module
Bugfixes
--------
- Changed unicast_failover element type to dictionary
- Fix force parameter set to yes causing list index out of range error
- Fix invalid parameter name in the bigip_config_sync action module
- Fix issue where ASM file download needs to be chunked for larger files.
- Fix issue with retaining package files in the bigip_lx_package module
- Fix key error in list comprehension in the AsmPolicyStatsParameters class
- Fix missing ssh-keyfile parameter causing key error in the bigip action plugin
New Modules
-----------
- bigip_ssl_key_cert - Import/Delete SSL keys and certs from BIG-IP
v1.5.0
======
Bugfixes
--------
- Fix issue with control characters in pool_id in bigiq_regkey_license_assignment module
- Fix the download of an APM policy in bigip_apm_policy_fetch module
v1.4.0
======
Major Changes
-------------
- Remove redundant parameters in f5_provider to fix disparity between documentation and module parameters
Minor Changes
-------------
- Add SSH connection type capability to bigip_wait module
- Add apply option to bigip_asm_policy_manage module
- Add retain_package_file option to bigip_lx_package module
- New bigip_asm_advanced_settings module to manage ASM settings
- New bigip_gtm_dns_listener module to manage DNS listener configuration
Bugfixes
--------
- Fix ASM policy import issue by users with web-application-security-administrator role
- Fix idempotency when using true_names parameter in bigip_profile_client_ssl module
New Modules
-----------
- bigip_asm_advanced_settings - Manages BIG-IP system ASM advanced settings.
- bigip_gtm_dns_listener - Configures the BIG-IP DNS system to answer TCP or UDP DNS requests.
v1.3.0
======
Major Changes
-------------
- Broke apart bigip_device_auth_radius to implement radius server configuration in bigip_device_auth_server module. Refer to module documentation for usage details
Minor Changes
-------------
- Add SSL certificate subject_alternative_name information to bigip_device_info module
- Add ability to install software images on vCMP guests with the bigip_software_install module
- Add cipher_list parameter to bigip_monitor_https
- Add hw_syn_cookie parameter to bigip_vlan module
- Add option to bypass all module validation for bigip_virtual_server
- Add pool order option to bigip_gtm_wide_ip module
- Add pva_acceleration parameter to bigip_profile_fastl4 module
- Add set_variable type to bigip_policy_rule module
- Add time_wait_timeout parameter to bigip_profile_tcp module
- Add use_for_auth parameter to bigip_device_auth_ldap module to allow setting up LDAP as the authentication source
- New bigip_device_auth_radius server module to manage radius server configuration
- New bigip_monitor_mysql module to manage mySQL monitor configuration
- New bigip_monitor_oracle module to manage oracle monitor configuration
- New bigip_ssl_csr_module to create CSR files
Removed Features (previously deprecated)
----------------------------------------
- Remove bigip_appsvcs_extension module
Bugfixes
--------
- Fix invalid data type of partition_access parameter in the bigip_user module
New Modules
-----------
- bigip_device_auth_radius - Manages RADIUS auth configuration on a BIG-IP.
- bigip_device_auth_radius_server - Manages the RADIUS server configuration on a BIG-IP.
- bigip_monitor_mysql - Manages BIG-IP MySQL monitors.
- bigip_monitor_oracle - Manages BIG-IP Oracle monitors.
- bigip_ssl_csr - Creates SSL CSR files on the BIG-IP.
v1.2.0
======
Minor Changes
-------------
- Add ImishConfig class to add duplicate records handling capability
- Add additional dos vectors to bigip_firewall_dos_vector_module
- Add addon_keys parameter to bigip_device_license module
- Add aliases for address and port to bigip_monitor_tcp module
- Add allow_duplicates parameter to bigip_imish_config module
- Add check_profiles parameter to bypass profile verification ability in bigip_virtual_server module
- Add cipher_group parameter to bigip_profile_client_ssl module
- Add dns-oversize DNS protocol security vector to bigip_firewall_doc_vector
- Add forward_node option to bigip_policy_rule module
- Add ipv6-ext-hdr-frames security vector to bigip_firewall_doc_vector
- Add management routes information to bigip_device_info module
- Add support for BIG-IQ 7.0 and above to bigiq_device_info module
- Add virtual server policies information to bigip_device_info
- New bigip_device_auth_radius module to manage RADIUS auth configuration
Bugfixes
--------
- Change bigip_data_group module's records parameter type to 'raw'
- Fix '?' character handling in value for bigip_data_group module
- Fix a bug with using the true_name parameter in the bigip_profile_client_ssl module
- Fix an issue with /32 IPV6 subnets being saved as host rather than a network in bigip_data_group module
- Fix attribute error in bigip_software_install module
- Fix check_profiles boolean parameter conversion in bigip_virtual_server
- Fix handling of duplicate records by the bigip_imish_config module
v1.1.0
======
Minor Changes
-------------
- Add accounting parameter for tacacs type to bigip_device_auth module
- Add fw_enforcement_policy parameter to bigip_selfip module
- Add persist cookie option to bigip_policy_rule module
- Add phase1_lifetime parameter to bigip_ike_peer module
- Add self allow option to bigip_network_globals module
- Add true_names support to bigip_profile_client_ssl modules allowing specifying true filenames of the certificates
- New FTP monitor module for configuring and managing FTP monitors
- New ICMP monitor module for configuring and managing ICMP monitors
- New SMTP monitor module for configuring and managing SMTP monitors
- New universal persistence profile module for configuring and managing universal persistence profiles
Deprecated Features
-------------------
- Deprecated bigip_appsvcs_extension module
- Deprecated bigip_device_facts module name
- Deprecated bigiq_device_facts module name
Removed Features (previously deprecated)
----------------------------------------
- Remove _bigip_iapplx_package alias
- Remove _bigip_security_address_list alias
- Remove _bigip_security_port_list alias
- Remove _bigip_traffic_group alias
- Remove bigip_asm_policy module
Bugfixes
--------
- Fix IPv6 netmask for self IPs in bigip_device_info
- Fix allowing authenticated not authorized users using modules to modify a resource
- Fix save_when parameter not saving the configuration as expected in bigip_imish_config module
New Modules
-----------
- bigip_monitor_ftp - Manages FTP monitors on a BIG-IP.
- bigip_monitor_icmp - Manages F5 BIG-IP LTM ICMP monitors.
- bigip_monitor_smtp - Manages SMTP monitors on a BIG-IP.
- bigip_profile_persistence_universal - Manages universal persistence profiles.
v1.0.0
======
New Plugins
-----------
Lookup
~~~~~~
- bigiq_license - Returns a random license from the list.
- license_hopper - Returns a random license from the list.
New Modules
-----------
- bigip_apm_acl - Manages user-defined APM ACLs.
- bigip_apm_network_access - Manages the APM Network Access resource.
- bigip_apm_policy_fetch - Exports the APM policy or APM access profile from remote nodes.
- bigip_apm_policy_import - Manages BIG-IP APM policy or APM access profile imports.
- bigip_asm_dos_application - Manages application settings for DOS profiles.
- bigip_asm_policy_fetch - Exports the ASM policy from remote nodes.
- bigip_asm_policy_import - Manages BIG-IP ASM policy imports.
- bigip_asm_policy_manage - Manages BIG-IP ASM policies
- bigip_asm_policy_server_technology - Manages the Server Technology on an ASM policy.
- bigip_asm_policy_signature_set - Manages Signature Sets on an ASM policy.
- bigip_cgnat_lsn_pool - Manages CGNAT LSN Pools.
- bigip_cli_alias - Manages CLI aliases on a BIG-IP.
- bigip_cli_script - Manages CLI scripts on a BIG-IP.
- bigip_command - Runs TMSH and BASH commands on F5 devices.
- bigip_config - Manages BIG-IP configuration sections.
- bigip_configsync_action - Performs actions related to configuration synchronization (ConfigSync).
- bigip_data_group - Manages data groups on a BIG-IP.
- bigip_device_auth - Manages system authentication on a BIG-IP.
- bigip_device_auth_ldap - Manages LDAP device authentication settings on BIG-IP.
- bigip_device_certificate - Manages self-signed device certificates.
- bigip_device_connectivity - Manages device IP configuration settings for HA on a BIG-IP.
- bigip_device_dns - Manages BIG-IP device DNS settings.
- bigip_device_group - Manages device groups on a BIG-IP.
- bigip_device_group_member - Manages members in a device group.
- bigip_device_ha_group - Manages HA group settings on a BIG-IP system.
- bigip_device_httpd - Manages HTTPD related settings on BIG-IP.
- bigip_device_info - Collects information from F5 BIG-IP devices.
- bigip_device_license - Manages license installation and activation on BIG-IP devices.
- bigip_device_ntp - Manages NTP servers on a BIG-IP.
- bigip_device_sshd - Manages the SSHD settings of a BIG-IP.
- bigip_device_syslog - Manages system-level syslog settings on BIG-IP.
- bigip_device_traffic_group - Manages traffic groups on BIG-IP.
- bigip_device_trust - Manages the trust relationships between BIG-IPs.
- bigip_dns_cache_resolver - Manages DNS resolver cache configurations on BIG-IP.
- bigip_dns_nameserver - Manages LTM DNS nameservers on a BIG-IP.
- bigip_dns_resolver - Manages DNS resolvers on a BIG-IP.
- bigip_dns_zone - Manages DNS zones on BIG-IP.
- bigip_file_copy - Manages files in datastores on a BIG-IP.
- bigip_firewall_address_list - Manages address lists on BIG-IP AFM.
- bigip_firewall_dos_profile - Manages AFM DoS profiles on a BIG-IP.
- bigip_firewall_dos_vector - Manages the attack vector configuration in an AFM DoS profile.
- bigip_firewall_global_rules - Manages AFM global rule settings on a BIG-IP.
- bigip_firewall_log_profile - Manages AFM logging profiles configured in the system.
- bigip_firewall_log_profile_network - Configures Network Firewall related settings of the log profile.
- bigip_firewall_policy - Manages AFM security firewall policies on a BIG-IP.
- bigip_firewall_port_list - Manages port lists on BIG-IP AFM.
- bigip_firewall_rule - Manages AFM Firewall rules.
- bigip_firewall_rule_list - Manages AFM security firewall policies on a BIG-IP.
- bigip_firewall_schedule - Manages BIG-IP AFM schedule configurations.
- bigip_gtm_datacenter - Manages the Datacenter configuration on a BIG-IP.
- bigip_gtm_global - Manages global GTM settings.
- bigip_gtm_monitor_bigip - Manages F5 BIG-IP GTM BIG-IP monitors.
- bigip_gtm_monitor_external - Manages external GTM monitors on a BIG-IP.
- bigip_gtm_monitor_firepass - Manages F5 BIG-IP GTM FirePass monitors.
- bigip_gtm_monitor_http - Manages F5 BIG-IP GTM HTTP monitors.
- bigip_gtm_monitor_https - Manages F5 BIG-IP GTM HTTPS monitors.
- bigip_gtm_monitor_tcp - Manages F5 BIG-IP GTM TCP monitors.
- bigip_gtm_monitor_tcp_half_open - Manages F5 BIG-IP GTM TCP half-open monitors.
- bigip_gtm_pool - Manages F5 BIG-IP GTM pools.
- bigip_gtm_pool_member - Manages GTM pool member settings.
- bigip_gtm_server - Manages F5 BIG-IP GTM servers.
- bigip_gtm_topology_record - Manages GTM Topology Records.
- bigip_gtm_topology_region - Manages GTM Topology Regions.
- bigip_gtm_virtual_server - Manages F5 BIG-IP GTM virtual servers.
- bigip_gtm_wide_ip - Manages F5 BIG-IP GTM wide IPs.
- bigip_hostname - Manages the hostname of a BIG-IP.
- bigip_iapp_service - Manages TCL iApp services on a BIG-IP.
- bigip_iapp_template - Manages TCL iApp templates on a BIG-IP.
- bigip_ike_peer - Manages IPSec IKE Peer configuration on a BIG-IP.
- bigip_imish_config - Manages the BIG-IP advanced routing configuration sections.
- bigip_interface - Manages BIG-IP physical interfaces.
- bigip_ipsec_policy - Manages IPSec policies on a BIG-IP.
- bigip_irule - Manages iRules across different modules on a BIG-IP.
- bigip_log_destination - Manages log destinations on a BIG-IP.
- bigip_log_publisher - Manages log publishers on a BIG-IP.
- bigip_lx_package - Manages Javascript LX packages on a BIG-IP.
- bigip_management_route - Manages system management routes on a BIG-IP.
- bigip_message_routing_peer - Manages peers for routing generic message protocol messages.
- bigip_message_routing_protocol - Manages generic message parser profiles.
- bigip_message_routing_route - Manages static routes for routing message protocol messages.
- bigip_message_routing_router - Manages router profiles for message-routing protocols.
- bigip_message_routing_transport_config - Manages the configuration for an outgoing connection.
- bigip_monitor_dns - Manages DNS monitors on a BIG-IP.
- bigip_monitor_external - Manages external LTM monitors on a BIG-IP.
- bigip_monitor_gateway_icmp - Manages F5 BIG-IP LTM gateway ICMP monitors.
- bigip_monitor_http - Manages F5 BIG-IP LTM HTTP monitors
- bigip_monitor_https - Manages F5 BIG-IP LTM HTTPS monitors
- bigip_monitor_ldap - Manages BIG-IP LDAP monitors.
- bigip_monitor_snmp_dca - Manages BIG-IP SNMP data collecting agent (DCA) monitors.
- bigip_monitor_tcp_echo - Manages F5 BIG-IP LTM TCP echo monitors.
- bigip_monitor_tcp_half_open - Manages F5 BIG-IP LTM TCP half-open monitors.
- bigip_monitor_udp - Manages F5 BIG-IP LTM UDP monitors.
- bigip_network_globals - Manages network global settings on a BIG-IP.
- bigip_node - Manages F5 BIG-IP LTM nodes.
- bigip_partition - Manages BIG-IP partitions.
- bigip_password_policy - Manages the authentication password policy on a BIG-IP.
- bigip_policy - Manages the general policy configuration on a BIG-IP.
- bigip_policy_rule - Manages LTM policy rules on a BIG-IP.
- bigip_pool_member - Manages F5 BIG-IP LTM pool members.
- bigip_profile_analytics - Manages HTTP analytics profiles on a BIG-IP.
- bigip_profile_client_ssl - Manages client SSL profiles on a BIG-IP.
- bigip_profile_dns - Manages DNS profiles on a BIG-IP.
- bigip_profile_fastl4 - Manages Fast L4 profiles on a BIG-IP.
- bigip_profile_ftp - Manages FTP profiles on a BIG-IP.
- bigip_profile_http - Manages HTTP profiles on a BIG-IP.
- bigip_profile_http2 - Manages HTTP2 profiles on a BIG-IP.
- bigip_profile_http_compression - Manages HTTP compression profiles on a BIG-IP.
- bigip_profile_oneconnect - Manages OneConnect profiles on a BIG-IP.
- bigip_profile_persistence_cookie - Manages cookie persistence profiles on BIG-IP.
- bigip_profile_persistence_src_addr - Manages source address persistence profiles on a BIG-IP.
- bigip_profile_server_ssl - Manages server SSL profiles on a BIG-IP.
- bigip_profile_sip - Manages SIP profiles on a BIG-IP.
- bigip_profile_tcp - Manages TCP profiles on a BIG-IP.
- bigip_profile_udp - Manages UDP profiles on a BIG-IP.
- bigip_provision - Manages BIG-IP module provisioning.
- bigip_qkview - Manages qkviews on the device.
- bigip_remote_role - Manages remote roles on a BIG-IP.
- bigip_remote_syslog - Manipulates remote syslog settings on a BIG-IP.
- bigip_remote_user - Manages the default settings for remote user accounts on a BIG-IP.
- bigip_routedomain - Manages route domains on a BIG-IP.
- bigip_selfip - Manages Self IP addresses on a BIG-IP.
- bigip_service_policy - Manages service policies on a BIG-IP.
- bigip_smtp - Manages SMTP settings on the BIG-IP.
- bigip_snat_pool - Manages SNAT pools on a BIG-IP.
- bigip_snat_translation - Manages SNAT Translations on a BIG-IP.
- bigip_snmp - Manipulates general SNMP settings on a BIG-IP.
- bigip_snmp_community - Manages SNMP communities on a BIG-IP.
- bigip_snmp_trap - Manipulates SNMP trap information on a BIG-IP.
- bigip_software_image - Manages software images on a BIG-IP.
- bigip_software_install - Installs software images on a BIG-IP.
- bigip_software_update - Manages the software update settings of a BIG-IP.
- bigip_ssl_certificate - Imports/Deletes certificates from a BIG-IP.
- bigip_ssl_key - Imports/Deletes SSL keys from a BIG-IP.
- bigip_ssl_ocsp - Manages OCSP configurations on a BIG-IP.
- bigip_static_route - Manipulates static routes on a BIG-IP.
- bigip_sys_daemon_log_tmm - Manages BIG-IP tmm daemon log settings.
- bigip_sys_db - Manages BIG-IP system database variables.
- bigip_sys_global - Manages BIG-IP global settings.
- bigip_timer_policy - Manages timer policies on a BIG-IP.
- bigip_traffic_selector - Manages IPSec Traffic Selectors on a BIG-IP.
- bigip_trunk - Manages trunks on a BIG-IP.
- bigip_tunnel - Manages tunnels on a BIG-IP.
- bigip_ucs - Manages upload, installation, and removal of UCS files.
- bigip_ucs_fetch - Fetches a UCS file from remote nodes.
- bigip_user - Manages user accounts and user attributes on a BIG-IP.
- bigip_vcmp_guest - Manages vCMP guests on a BIG-IP.
- bigip_virtual_address - Manages LTM virtual addresses on a BIG-IP.
- bigip_virtual_server - Manages LTM virtual servers on a BIG-IP.
- bigip_vlan - Manages VLANs on a BIG-IP.
- bigip_wait - Manages the wait time for a BIG-IP condition before continuing.
- bigiq_application_fasthttp - Manages BIG-IQ FastHTTP applications.
- bigiq_application_fastl4_tcp - Manages BIG-IQ FastL4 TCP applications.
- bigiq_application_fastl4_udp - Manages BIG-IQ FastL4 UDP applications.
- bigiq_application_http - Manages BIG-IQ HTTP applications.
- bigiq_application_https_offload - Manages BIG-IQ HTTPS offload applications.
- bigiq_application_https_waf - Manages BIG-IQ HTTPS WAF applications.
- bigiq_device_discovery - Manages BIG-IP devices through BIG-IQ.
- bigiq_device_info - Collects information from F5 BIG-IQ devices.
- bigiq_regkey_license - Manages licenses in a BIG-IQ registration key pool.
- bigiq_regkey_license_assignment - Manages regkey license assignment on BIG-IPs from a BIG-IQ.
- bigiq_regkey_pool - Manages registration key pools on BIG-IQ.
- bigiq_utility_license - Manages utility licenses on a BIG-IQ.
- bigiq_utility_license_assignment - Manages utility license assignment on BIG-IPs from a BIG-IQ.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
{
"collection_info": {
"namespace": "f5networks",
"name": "f5_modules",
"version": "1.22.0",
"authors": [
"Wojciech Wypior (@wojtek0806)"
],
"readme": "README.md",
"tags": [
"f5",
"networking",
"bigip",
"bigiq"
],
"description": "F5 BIG-IP Imperative Collection for Ansible",
"license": [
"GPL-3.0-only"
],
"license_file": null,
"dependencies": {
"ansible.netcommon": ">=2.0.0"
},
"repository": "https://github.com/F5Networks/f5-ansible-f5modules",
"documentation": "https://clouddocs.f5.com/products/orchestration/ansible/devel/modules/module_index.html",
"homepage": "https://clouddocs.f5.com/products/orchestration/ansible/devel/",
"issues": "https://github.com/F5Networks/f5-ansible/issues"
},
"file_manifest_file": {
"name": "FILES.json",
"ftype": "file",
"chksum_type": "sha256",
"chksum_sha256": "215384f2b3d638ec1e2f8164b8e079971130310242e06551713e55d98efaee9f",
"format": 1
},
"format": 1
}

View File

@@ -0,0 +1,104 @@
# F5 BIG-IP Imperative Collection for Ansible
This collection includes imperative Ansible modules for BIG-IP and BIG-IQ from F5 Networks.
This collection packages and distributes modules, and plugins.
## Requirements
- ansible >= 2.9
- packaging
## Python Version Notice
Collection only supports python 3.6 and above, however F5 recommends Python 3.8 and above.
## Installation
To install in ansible default or defined paths use:
```bash
ansible-galaxy collection install f5networks.f5_modules
```
To specify the installation location use `-p`. If specifying a folder, make sure to update the `ansible.cfg` so ansible will check this folder as well.
```bash
ansible-galaxy collection install f5networks.f5_modules -p collections/
```
To specify the version of the collection to install, include it at the end of the collection with `:==1.0.0`:
```bash
ansible-galaxy collection install f5networks.f5_modules:==1.0.0
```
Semantic Versioning examples below:
- Increment major (for example: x in x.y.z) version number for an incompatible API change.
- Increment minor (for example: y in x.y.z) version number for new functionality in a backwards compatible manner.
- Increment patch (for example: z in x.y.z) version number for backwards compatible bug fixes.
## Example Usage
To use a module from a collection, reference the full namespace, collection, and modules name that you want to use:
```
---
- name: Using Collections
hosts: f5
connection: local
tasks:
- f5networks.f5_modules.bigip_pool:
name: my-pool
....
```
## Collections Daily Build
We offer a daily build of our most recent collection [dailybuild]. Use this Collection to test the most
recent Ansible module updates between releases. You can also install development build directly from GitHub see [repoinstall].
### Install from GitHub
```bash
ansible-galaxy collection install git+https://github.com/F5Networks/f5-ansible-bigip.git#ansible_collections/f5networks/f5_bigip
```
### Install from the daily build file
```bash
ansible-galaxy collection install <collection name> -p ./collections
e.g.
ansible-galaxy collection install f5networks-f5_modules-devel.tar.gz -p ./collections
```
> **_NOTE:_** `-p` is the location in which the collection will be installed. This location should be defined in the path for
Ansible to search for collections. An example of this would be adding ``collections_paths = ./collections``
to your **ansible.cfg**
### Running latest devel in EE
We also offer a new method of running the collection inside Ansible's Execution Environment container.
The advantage of such approach is that any required package dependencies and minimum supported pyton versions are
installed in an isolated container which minimizes any environment related issues during runtime. More information on EE
can be found here [execenv]. Use the below requirements.yml file when building EE container:
```yaml
---
collections:
- name: ansible.netcommon
version: ">=2.0.0"
- name: f5networks.f5_modules
source: https://github.com/F5Networks/f5-ansible-f5modules#ansible_collections/f5networks/f5_modules
type: git
version: devel
```
Please see [f5execenv] documentation for further instructions how to use and build EE container with our devel branch.
## Author Information
F5 Networks
[F5 Networks](http://www.f5.com)
[repoinstall]: https://docs.ansible.com/ansible/latest/user_guide/collections_using.html#installing-a-collection-from-a-git-repository
[dailybuild]: https://f5-ansible.s3.amazonaws.com/collections/f5networks-f5_modules-devel.tar.gz
[execenv]: https://docs.ansible.com/automation-controller/latest/html/userguide/execution_environments.html
[f5execenv]: http://clouddocs.f5.com/products/orchestration/ansible/devel/usage/exec-env.html

View File

@@ -0,0 +1,910 @@
objects:
role: {}
plugins:
become: {}
cache: {}
callback: {}
cliconf: {}
connection: {}
httpapi: {}
inventory: {}
lookup:
bigiq_license:
description: Select a random license key from a pool of biqiq available licenses
name: bigiq_license
version_added: '1.0'
license_hopper:
description: Return random license from list
name: license_hopper
version_added: '1.0'
module:
bigip_apm_acl:
description: Manage user-defined APM ACLs
name: bigip_apm_acl
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_apm_network_access:
description: Manage APM Network Access resource
name: bigip_apm_network_access
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_apm_policy_fetch:
description: Exports the APM policy or APM access profile from remote nodes.
name: bigip_apm_policy_fetch
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_apm_policy_import:
description: Manage BIG-IP APM policy or APM access profile imports
name: bigip_apm_policy_import
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_advanced_settings:
description: Manage BIG-IP system ASM advanced settings
name: bigip_asm_advanced_settings
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.4.0
bigip_asm_dos_application:
description: Manage application settings for a DOS profile
name: bigip_asm_dos_application
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_policy_fetch:
description: Exports the ASM policy from remote nodes.
name: bigip_asm_policy_fetch
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_policy_import:
description: Manage BIG-IP ASM policy imports
name: bigip_asm_policy_import
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_policy_manage:
description: Manage BIG-IP ASM policies
name: bigip_asm_policy_manage
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_policy_server_technology:
description: Manages Server Technology on an ASM policy
name: bigip_asm_policy_server_technology
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_asm_policy_signature_set:
description: Manages Signature Sets on an ASM policy
name: bigip_asm_policy_signature_set
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_cgnat_lsn_pool:
description: Manage CGNAT LSN Pools
name: bigip_cgnat_lsn_pool
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_cli_alias:
description: Manage CLI aliases on a BIG-IP
name: bigip_cli_alias
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_cli_script:
description: Manage CLI scripts on a BIG-IP
name: bigip_cli_script
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_command:
description: Run TMSH and BASH commands on F5 devices
name: bigip_command
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_config:
description: Manage BIG-IP configuration sections
name: bigip_config
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_configsync_action:
description: Perform different actions related to config-sync
name: bigip_configsync_action
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_data_group:
description: Manage data groups on a BIG-IP
name: bigip_data_group
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_auth:
description: Manage system authentication on a BIG-IP
name: bigip_device_auth
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_auth_ldap:
description: Manage LDAP device authentication settings on BIG-IP
name: bigip_device_auth_ldap
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_auth_radius:
description: Manages RADIUS auth configuration on a BIG-IP device
name: bigip_device_auth_radius
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.3.0
bigip_device_auth_radius_server:
description: Manages the RADIUS server configuration of the device
name: bigip_device_auth_radius_server
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.3.0
bigip_device_certificate:
description: Manage self-signed device certificates
name: bigip_device_certificate
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_connectivity:
description: Manages device IP configuration settings for HA on a BIG-IP.
name: bigip_device_connectivity
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_dns:
description: Manage DNS settings on a BIG-IP
name: bigip_device_dns
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_group:
description: Manage device groups on a BIG-IP
name: bigip_device_group
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_group_member:
description: Manages members in a device group
name: bigip_device_group_member
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_ha_group:
description: Manage HA group settings on a BIG-IP system
name: bigip_device_ha_group
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_httpd:
description: Manage HTTPD related settings on a BIG-IP system
name: bigip_device_httpd
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_info:
description: Collect information from F5 BIG-IP devices
name: bigip_device_info
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_license:
description: Manage license installation and activation on BIG-IP devices
name: bigip_device_license
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_ntp:
description: Manage NTP servers on a BIG-IP
name: bigip_device_ntp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_sshd:
description: Manage the SSHD settings of a BIG-IP
name: bigip_device_sshd
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_syslog:
description: Manage system-level syslog settings on BIG-IP
name: bigip_device_syslog
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_traffic_group:
description: Manages traffic groups on BIG-IP
name: bigip_device_traffic_group
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_device_trust:
description: Manage the trust relationships between BIG-IPs
name: bigip_device_trust
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_dns_cache_resolver:
description: Manage DNS resolver cache configuration on a BIG-IP
name: bigip_dns_cache_resolver
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_dns_nameserver:
description: Manage LTM DNS nameservers on a BIG-IP
name: bigip_dns_nameserver
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_dns_resolver:
description: Manage DNS resolvers on a BIG-IP
name: bigip_dns_resolver
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_dns_zone:
description: Manage DNS zones on BIG-IP
name: bigip_dns_zone
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_file_copy:
description: Manage files in datastores on a BIG-IP
name: bigip_file_copy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_address_list:
description: Manage address lists on BIG-IP AFM
name: bigip_firewall_address_list
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_dos_profile:
description: Manage AFM DoS profiles on a BIG-IP
name: bigip_firewall_dos_profile
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_dos_vector:
description: Manage attack vector configuration in an AFM DoS profile
name: bigip_firewall_dos_vector
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_global_rules:
description: Manage AFM global rule settings on BIG-IP
name: bigip_firewall_global_rules
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_log_profile:
description: Manages AFM logging profiles configured in the system
name: bigip_firewall_log_profile
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_log_profile_network:
description: Configures Network Firewall related settings of the log profile
name: bigip_firewall_log_profile_network
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_policy:
description: Manage AFM security firewall policies on a BIG-IP
name: bigip_firewall_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_port_list:
description: Manage port lists on BIG-IP AFM
name: bigip_firewall_port_list
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_rule:
description: Manage AFM Firewall rules
name: bigip_firewall_rule
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_rule_list:
description: Manage AFM security firewall policies on a BIG-IP
name: bigip_firewall_rule_list
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_firewall_schedule:
description: Manage BIG-IP AFM schedule configurations
name: bigip_firewall_schedule
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_datacenter:
description: Manage Datacenter configuration in BIG-IP
name: bigip_gtm_datacenter
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_dns_listener:
description: Configures the BIG-IP DNS system to answer TCP or UDP DNS requests
name: bigip_gtm_dns_listener
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.4.0
bigip_gtm_global:
description: Manages global GTM settings
name: bigip_gtm_global
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_bigip:
description: Manages F5 BIG-IP GTM BIG-IP monitors
name: bigip_gtm_monitor_bigip
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_external:
description: Manages external GTM monitors on a BIG-IP
name: bigip_gtm_monitor_external
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_firepass:
description: Manages F5 BIG-IP GTM FirePass monitors
name: bigip_gtm_monitor_firepass
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_http:
description: Manages F5 BIG-IP GTM HTTP monitors
name: bigip_gtm_monitor_http
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_https:
description: Manages F5 BIG-IP GTM HTTPS monitors
name: bigip_gtm_monitor_https
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_tcp:
description: Manages F5 BIG-IP GTM TCP monitors
name: bigip_gtm_monitor_tcp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_monitor_tcp_half_open:
description: Manages F5 BIG-IP GTM TCP half-open monitors
name: bigip_gtm_monitor_tcp_half_open
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_pool:
description: Manages F5 BIG-IP GTM pools
name: bigip_gtm_pool
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_pool_member:
description: Manage GTM pool member settings
name: bigip_gtm_pool_member
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_server:
description: Manages F5 BIG-IP GTM servers
name: bigip_gtm_server
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_topology_record:
description: Manages GTM Topology Records
name: bigip_gtm_topology_record
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_topology_region:
description: Manages GTM Topology Regions
name: bigip_gtm_topology_region
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_virtual_server:
description: Manages F5 BIG-IP GTM virtual servers
name: bigip_gtm_virtual_server
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_gtm_wide_ip:
description: Manages F5 BIG-IP GTM Wide IP
name: bigip_gtm_wide_ip
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_hostname:
description: Manage the hostname of a BIG-IP
name: bigip_hostname
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_iapp_service:
description: Manages TCL iApp services on a BIG-IP
name: bigip_iapp_service
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_iapp_template:
description: Manages TCL iApp templates on a BIG-IP.
name: bigip_iapp_template
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ike_peer:
description: Manage IPSec IKE Peer configuration on BIG-IP
name: bigip_ike_peer
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_imish_config:
description: Manage BIG-IP advanced routing configuration sections
name: bigip_imish_config
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_interface:
description: Module to manage BIG-IP physical interfaces.
name: bigip_interface
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ipsec_policy:
description: Manage IPSec policies on a BIG-IP
name: bigip_ipsec_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_irule:
description: Manage iRules across different modules on a BIG-IP
name: bigip_irule
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_log_destination:
description: Manages log destinations on a BIG-IP.
name: bigip_log_destination
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_log_publisher:
description: Manages log publishers on a BIG-IP
name: bigip_log_publisher
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_lx_package:
description: Manages Javascript LX packages on a BIG-IP
name: bigip_lx_package
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_management_route:
description: Manage system management routes on a BIG-IP
name: bigip_management_route
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_message_routing_peer:
description: Manage peers for routing generic message protocol messages
name: bigip_message_routing_peer
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_message_routing_protocol:
description: Manage the generic message parser profile.
name: bigip_message_routing_protocol
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_message_routing_route:
description: Manages static routes for routing message protocol messages
name: bigip_message_routing_route
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_message_routing_router:
description: Manages router profiles for message-routing protocols
name: bigip_message_routing_router
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_message_routing_transport_config:
description: Manages configuration for an outgoing connection
name: bigip_message_routing_transport_config
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_dns:
description: Manage DNS monitors on a BIG-IP
name: bigip_monitor_dns
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_external:
description: Manages external LTM monitors on a BIG-IP
name: bigip_monitor_external
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_ftp:
description: Manage FTP monitors on a BIG-IP
name: bigip_monitor_ftp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.1.0
bigip_monitor_gateway_icmp:
description: Manages F5 BIG-IP LTM gateway ICMP monitors
name: bigip_monitor_gateway_icmp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_http:
description: Manages F5 BIG-IP LTM HTTP monitors
name: bigip_monitor_http
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_https:
description: Manages F5 BIG-IP LTM HTTPS monitors
name: bigip_monitor_https
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_icmp:
description: Manages F5 BIG-IP LTM ICMP monitors
name: bigip_monitor_icmp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.1.0
bigip_monitor_ldap:
description: Manages BIG-IP LDAP monitors
name: bigip_monitor_ldap
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_mysql:
description: Manages BIG-IP MySQL monitors
name: bigip_monitor_mysql
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.3.0
bigip_monitor_oracle:
description: Manages BIG-IP Oracle monitors
name: bigip_monitor_oracle
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.3.0
bigip_monitor_smtp:
description: Manage SMTP monitors on a BIG-IP
name: bigip_monitor_smtp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.1.0
bigip_monitor_snmp_dca:
description: Manages BIG-IP SNMP data collecting agent (DCA) monitors
name: bigip_monitor_snmp_dca
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_tcp:
description: Manages F5 BIG-IP LTM TCP monitors
name: bigip_monitor_tcp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_tcp_echo:
description: Manages F5 BIG-IP LTM TCP echo monitors
name: bigip_monitor_tcp_echo
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_tcp_half_open:
description: Manages F5 BIG-IP LTM TCP half-open monitors
name: bigip_monitor_tcp_half_open
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_monitor_udp:
description: Manages F5 BIG-IP LTM UDP monitors
name: bigip_monitor_udp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_network_globals:
description: Manage network global settings on BIG-IP
name: bigip_network_globals
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_node:
description: Manages F5 BIG-IP LTM nodes
name: bigip_node
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_partition:
description: Manage BIG-IP partitions
name: bigip_partition
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_password_policy:
description: Manages the authentication password policy on a BIG-IP
name: bigip_password_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_policy:
description: Manage general policy configuration on a BIG-IP
name: bigip_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_policy_rule:
description: Manage LTM policy rules on a BIG-IP
name: bigip_policy_rule
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_pool:
description: Manages F5 BIG-IP LTM pools
name: bigip_pool
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_pool_member:
description: Manages F5 BIG-IP LTM pool members
name: bigip_pool_member
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_analytics:
description: Manage HTTP analytics profiles on a BIG-IP
name: bigip_profile_analytics
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_client_ssl:
description: Manages client SSL profiles on a BIG-IP
name: bigip_profile_client_ssl
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_dns:
description: Manage DNS profiles on a BIG-IP
name: bigip_profile_dns
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_fastl4:
description: Manages Fast L4 profiles
name: bigip_profile_fastl4
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_ftp:
description: Manages FTP profiles
name: bigip_profile_ftp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_http:
description: Manage HTTP profiles on a BIG-IP
name: bigip_profile_http
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_http2:
description: Manage HTTP2 profiles on a BIG-IP
name: bigip_profile_http2
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_http_compression:
description: Manage HTTP compression profiles on a BIG-IP
name: bigip_profile_http_compression
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_oneconnect:
description: Manage OneConnect profiles on a BIG-IP
name: bigip_profile_oneconnect
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_persistence_cookie:
description: Manage cookie persistence profiles on BIG-IP
name: bigip_profile_persistence_cookie
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_persistence_src_addr:
description: Manage source address persistence profiles
name: bigip_profile_persistence_src_addr
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_persistence_universal:
description: Manage universal persistence profiles
name: bigip_profile_persistence_universal
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.1.0
bigip_profile_server_ssl:
description: Manages server SSL profiles on a BIG-IP
name: bigip_profile_server_ssl
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_sip:
description: Manage SIP profiles on a BIG-IP
name: bigip_profile_sip
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_tcp:
description: Manage TCP profiles on a BIG-IP
name: bigip_profile_tcp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_profile_udp:
description: Manage UDP profiles on a BIG-IP
name: bigip_profile_udp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_provision:
description: Manage BIG-IP module provisioning
name: bigip_provision
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_qkview:
description: Manage QKviews on the device
name: bigip_qkview
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_remote_role:
description: Manage remote roles on a BIG-IP
name: bigip_remote_role
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_remote_syslog:
description: Manipulate remote syslog settings on a BIG-IP
name: bigip_remote_syslog
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_remote_user:
description: Manages default settings for remote user accounts on a BIG-IP
name: bigip_remote_user
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_routedomain:
description: Manage route domains on a BIG-IP
name: bigip_routedomain
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_selfip:
description: Manage Self-IPs on a BIG-IP system
name: bigip_selfip
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_service_policy:
description: Manages service policies on a BIG-IP.
name: bigip_service_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_smtp:
description: Manages SMTP settings on the BIG-IP
name: bigip_smtp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_snat_pool:
description: Manage SNAT pools on a BIG-IP
name: bigip_snat_pool
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_snat_translation:
description: Manage SNAT translations on a BIG-IP
name: bigip_snat_translation
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_snmp:
description: Manipulate general SNMP settings on a BIG-IP
name: bigip_snmp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_snmp_community:
description: Manages SNMP communities on a BIG-IP.
name: bigip_snmp_community
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_snmp_trap:
description: Manipulate SNMP trap information on a BIG-IP
name: bigip_snmp_trap
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_software_image:
description: Manage software images on a BIG-IP
name: bigip_software_image
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_software_install:
description: Install software images on a BIG-IP
name: bigip_software_install
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_software_update:
description: Manage the software update settings of a BIG-IP
name: bigip_software_update
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ssl_certificate:
description: Import/Delete certificates from BIG-IP
name: bigip_ssl_certificate
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ssl_csr:
description: Create SSL CSR files on the BIG-IP
name: bigip_ssl_csr
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.3.0
bigip_ssl_key:
description: Import/Delete SSL keys from BIG-IP
name: bigip_ssl_key
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ssl_key_cert:
description: Import/Delete SSL keys and certs from BIG-IP
name: bigip_ssl_key_cert
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.6.0
bigip_ssl_ocsp:
description: Manage OCSP configurations on BIG-IP
name: bigip_ssl_ocsp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_static_route:
description: Manipulate static routes on a BIG-IP
name: bigip_static_route
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_sys_daemon_log_tmm:
description: Manage BIG-IP tmm daemon log settings
name: bigip_sys_daemon_log_tmm
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_sys_db:
description: Manage BIG-IP system database variables
name: bigip_sys_db
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_sys_global:
description: Manage BIG-IP global settings
name: bigip_sys_global
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_timer_policy:
description: Manage timer policies on a BIG-IP
name: bigip_timer_policy
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_traffic_selector:
description: Manage IPSec Traffic Selectors on BIG-IP
name: bigip_traffic_selector
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_trunk:
description: Manage trunks on a BIG-IP
name: bigip_trunk
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_tunnel:
description: Manage tunnels on a BIG-IP
name: bigip_tunnel
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ucs:
description: Manage upload, installation, and removal of UCS files
name: bigip_ucs
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_ucs_fetch:
description: Fetches a UCS file from remote nodes
name: bigip_ucs_fetch
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_user:
description: Manage user accounts and user attributes on a BIG-IP
name: bigip_user
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_vcmp_guest:
description: Manages vCMP guests on a BIG-IP
name: bigip_vcmp_guest
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_virtual_address:
description: Manage LTM virtual addresses on a BIG-IP
name: bigip_virtual_address
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_virtual_server:
description: Manage LTM virtual servers on a BIG-IP
name: bigip_virtual_server
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_vlan:
description: Manage VLANs on a BIG-IP system
name: bigip_vlan
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigip_wait:
description: Wait for a BIG-IP condition before continuing
name: bigip_wait
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_fasthttp:
description: Manages BIG-IQ FastHTTP applications
name: bigiq_application_fasthttp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_fastl4_tcp:
description: Manages BIG-IQ FastL4 TCP applications
name: bigiq_application_fastl4_tcp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_fastl4_udp:
description: Manages BIG-IQ FastL4 UDP applications
name: bigiq_application_fastl4_udp
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_http:
description: Manages BIG-IQ HTTP applications
name: bigiq_application_http
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_https_offload:
description: Manages BIG-IQ HTTPS offload applications
name: bigiq_application_https_offload
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_application_https_waf:
description: Manages BIG-IQ HTTPS WAF applications
name: bigiq_application_https_waf
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_device_discovery:
description: Manage BIG-IP devices through BIG-IQ
name: bigiq_device_discovery
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_device_info:
description: Collect information from F5 BIG-IQ devices
name: bigiq_device_info
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_regkey_license:
description: Manages licenses in a BIG-IQ registration key pool
name: bigiq_regkey_license
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_regkey_license_assignment:
description: Manage regkey license assignment on BIG-IPs from a BIG-IQ
name: bigiq_regkey_license_assignment
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_regkey_pool:
description: Manages registration key pools on BIG-IQ
name: bigiq_regkey_pool
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_utility_license:
description: Manage utility licenses on a BIG-IQ
name: bigiq_utility_license
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
bigiq_utility_license_assignment:
description: Manage utility license assignment on BIG-IPs from a BIG-IQ
name: bigiq_utility_license_assignment
namespace: private.tmp.antsibull-changelog0vn04r4z.collections.ansible_collections.f5networks.f5_modules.plugins.modules
version_added: 1.0.0
netconf: {}
shell: {}
strategy: {}
vars: {}
version: 1.11.0

View File

@@ -0,0 +1,31 @@
changelog_filename_template: ../CHANGELOG.rst
changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
ignore_other_fragment_extensions: true
keep_fragments: false
archive_path_template: ../../../fragments_archive/{version}
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments
prelude_section_name: release_summary
prelude_section_title: Release Summary
sections:
- - major_changes
- Major Changes
- - minor_changes
- Minor Changes
- - breaking_changes
- Breaking Changes / Porting Guide
- - deprecated_features
- Deprecated Features
- - removed_features
- Removed Features (previously deprecated)
- - security_fixes
- Security Fixes
- - bugfixes
- Bugfixes
- - known_issues
- Known Issues
title: F5Networks F5_Modules Collection
trivial_section_name: trivial

View File

@@ -0,0 +1,12 @@
---
requires_ansible: '>=2.9'
plugin_routing:
modules:
bigip_device_facts:
redirect: f5networks.f5_modules.bigip_device_info
bigia_device_facts:
redirect: f5networks.f5_modules.bigiq_device_info
bigip_appsvcs_extension:
tombstone:
removal_date: 2020-03-05
warning_text: bigip_appsvcs_extension has been removed.

View File

@@ -0,0 +1,98 @@
#
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import copy
from ansible import constants as C
from ansible.module_utils._text import to_text
from ansible.module_utils.connection import Connection
from ansible.utils.display import Display
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
from ansible_collections.f5networks.f5_modules.plugins.module_utils.common import f5_provider_spec
display = Display()
class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
del tmp # tmp no longer has any effect
self._config_module = True if self._task.action == 'bigip_imish_config' else False
socket_path = None
transport = 'rest'
if self._play_context.connection == 'network_cli':
provider = self._task.args.get('provider', {})
if any(provider.values()):
display.warning("'provider' is unnecessary when using 'network_cli' and will be ignored")
elif self._play_context.connection == 'local':
provider = load_provider(f5_provider_spec, self._task.args)
transport = provider['transport'] or transport
display.vvvv('connection transport is %s' % transport, self._play_context.remote_addr)
if transport == 'cli':
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'bigip'
pc.remote_addr = provider['server'] or self._play_context.remote_addr
pc.port = int(provider['server_port'] or self._play_context.port or 22)
pc.remote_user = provider['user'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
pc.private_key_file = provider.get('ssh_keyfile', None) or self._play_context.private_key_file
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
display.vvv('using connection plugin %s' % pc.connection, pc.remote_addr)
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin)
connection.set_options(direct={'persistent_command_timeout': command_timeout})
socket_path = connection.run()
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
if not socket_path:
return {
'failed': True,
'msg': 'Unable to open shell. Please see: '
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'
}
task_vars['ansible_socket'] = socket_path
if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli':
# make sure we are in the right cli context which should be
# enable mode and not config module
if socket_path is None:
socket_path = self._connection.socket_path
conn = Connection(socket_path)
out = conn.get_prompt()
while '(config' in to_text(out, errors='surrogate_then_replace').strip():
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
conn.send_command('exit')
out = conn.get_prompt()
result = super(ActionModule, self).run(task_vars=task_vars)
return result

View File

@@ -0,0 +1,108 @@
#
# (c) 2017, Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import re
import time
import glob
from ansible.module_utils._text import to_text
from ansible.module_utils.six.moves.urllib.parse import urlsplit
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
from ansible.utils.display import Display
display = Display()
PRIVATE_KEYS_RE = re.compile('__.+__')
class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
if self._task.args.get('src'):
try:
self._handle_template()
except ValueError as exc:
return dict(failed=True, msg=to_text(exc))
result = super(ActionModule, self).run(task_vars=task_vars)
del tmp # tmp no longer has any effect
if self._task.args.get('backup') and result.get('__backup__'):
# User requested backup and no error occurred in module.
# NOTE: If there is a parameter error, _backup key may not be in results.
filepath = self._write_backup(task_vars['inventory_hostname'], result['__backup__'])
result['backup_path'] = filepath
# strip out any keys that have two leading and two trailing
# underscore characters
for key in list(result.keys()):
if PRIVATE_KEYS_RE.match(key):
del result[key]
return result
def _write_backup(self, host, contents):
backup_path = self._get_working_path() + '/backup'
if not os.path.exists(backup_path):
os.mkdir(backup_path)
for fn in glob.glob('%s/%s*' % (backup_path, host)):
os.remove(fn)
tstamp = time.strftime("%Y-%m-%d@%H:%M:%S", time.localtime(time.time()))
filename = '%s/%s_config.%s' % (backup_path, host, tstamp)
fh = open(filename, 'w')
fh.write(contents)
fh.close()
return filename
def _handle_template(self):
src = self._task.args.get('src')
working_path = self._get_working_path()
if os.path.isabs(src) or urlsplit('src').scheme:
source = src
else:
source = self._loader.path_dwim_relative(working_path, 'templates', src)
if not source:
source = self._loader.path_dwim_relative(working_path, src)
if not os.path.exists(source):
raise ValueError('path specified in src not found')
try:
with open(source, 'r') as f:
template_data = to_text(f.read())
except IOError:
return dict(failed=True, msg='unable to load src file')
# Create a template search path in the following order:
# [working_path, self_role_path, dependent_role_paths, dirname(source)]
searchpath = [working_path]
if self._task._role is not None:
searchpath.append(self._task._role._role_path)
if hasattr(self._task, "_block:"):
dep_chain = self._task._block.get_dep_chain()
if dep_chain is not None:
for role in dep_chain:
searchpath.append(role._role_path)
searchpath.append(os.path.dirname(source))
self._templar.environment.loader.searchpath = searchpath
self._task.args['src'] = self._templar.template(template_data)

View File

@@ -0,0 +1,90 @@
#
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import copy
from ansible import constants as C
from ansible.module_utils._text import to_text
from ansible.module_utils.connection import Connection
from ansible.utils.display import Display
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import load_provider
from ansible_collections.ansible.netcommon.plugins.action.network import ActionModule as ActionNetworkModule
from ansible_collections.f5networks.f5_modules.plugins.module_utils.common import f5_provider_spec
display = Display()
class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
socket_path = None
transport = 'rest'
if self._play_context.connection == 'network_cli':
provider = self._task.args.get('provider', {})
if any(provider.values()):
display.warning("'provider' is unnecessary when using 'network_cli' and will be ignored")
elif self._play_context.connection == 'local':
provider = load_provider(f5_provider_spec, self._task.args)
transport = provider['transport'] or transport
display.vvvv('connection transport is %s' % transport, self._play_context.remote_addr)
if transport == 'cli':
pc = copy.deepcopy(self._play_context)
pc.connection = 'network_cli'
pc.network_os = 'bigiq'
pc.remote_addr = provider.get('server', self._play_context.remote_addr)
pc.port = int(provider['server_port'] or self._play_context.port or 22)
pc.remote_user = provider.get('user', self._play_context.connection_user)
pc.password = provider.get('password', self._play_context.password)
pc.private_key_file = provider['ssh_keyfile'] or self._play_context.private_key_file
command_timeout = int(provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT)
display.vvv('using connection plugin %s' % pc.connection, pc.remote_addr)
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin)
connection.set_options(direct={'persistent_command_timeout': command_timeout})
socket_path = connection.run()
display.vvvv('socket_path: %s' % socket_path, pc.remote_addr)
if not socket_path:
return {'failed': True,
'msg': 'Unable to open shell. Please see: '
'https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell'}
task_vars['ansible_socket'] = socket_path
if (self._play_context.connection == 'local' and transport == 'cli') or self._play_context.connection == 'network_cli':
# make sure we are in the right cli context which should be
# enable mode and not config module
if socket_path is None:
socket_path = self._connection.socket_path
conn = Connection(socket_path)
out = conn.get_prompt()
while '(config' in to_text(out, errors='surrogate_then_replace').strip():
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
conn.send_command('exit')
out = conn.get_prompt()
result = super(ActionModule, self).run(task_vars=task_vars)
return result

View File

@@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class ModuleDocFragment(object):
# Standard F5 documentation fragment
DOCUMENTATION = r'''
options:
provider:
description:
- A dict object containing connection details.
type: dict
version_added: "1.0.0"
suboptions:
password:
description:
- The password for the user account used to connect to the BIG-IP.
- You may omit this option by setting the environment variable C(F5_PASSWORD).
type: str
required: true
aliases: [ pass, pwd ]
server:
description:
- The BIG-IP host.
- You may omit this option by setting the environment variable C(F5_SERVER).
type: str
required: true
server_port:
description:
- The BIG-IP server port.
- You may omit this option by setting the environment variable C(F5_SERVER_PORT).
type: int
default: 443
user:
description:
- The username to connect to the BIG-IP with. This user must have
administrative privileges on the device.
- You may omit this option by setting the environment variable C(F5_USER).
type: str
required: true
validate_certs:
description:
- If C(no), SSL certificates are not validated. Use this only
on personally controlled sites using self-signed certificates.
- You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
type: bool
default: yes
timeout:
description:
- Specifies the timeout in seconds for communicating with the network device
for either connecting or sending commands. If the timeout is
exceeded before the operation is completed, the module will error.
type: int
transport:
description:
- Configures the transport connection to use when connecting to the
remote device.
type: str
choices: [ rest ]
default: rest
no_f5_teem:
description:
- If C(yes), TEEM telemetry data is not sent to F5.
- You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
- Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
default: no
type: bool
auth_provider:
description:
- Configures the auth provider for to obtain authentication tokens from the remote device.
- This option is really used when working with BIG-IQ devices.
type: str
notes:
- For more information on using Ansible to manage F5 Networks devices see U(https://www.ansible.com/integrations/networks/f5).
- Requires BIG-IP software version >= 12.
- The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP
specific configuration persists to disk, be sure to include at least one task that uses the
M(f5networks.f5_modules.bigip_config) module to save the running configuration. Refer to the module's documentation for
the correct usage of the module to save your running configuration.
'''

View File

@@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class ModuleDocFragment(object):
# Standard F5 documentation fragment
DOCUMENTATION = r'''
options:
provider:
description:
- A dict object containing connection details.
type: dict
version_added: "1.0.0"
suboptions:
password:
description:
- The password for the user account used to connect to the BIG-IP.
- You may omit this option by setting the environment variable C(F5_PASSWORD).
type: str
required: true
aliases: [ pass, pwd ]
server:
description:
- The BIG-IP host.
- You may omit this option by setting the environment variable C(F5_SERVER).
type: str
required: true
server_port:
description:
- The BIG-IP server port.
- You may omit this option by setting the environment variable C(F5_SERVER_PORT).
type: int
default: 443
user:
description:
- The username to connect to the BIG-IP with. This user must have
administrative privileges on the device.
- You may omit this option by setting the environment variable C(F5_USER).
type: str
required: true
validate_certs:
description:
- If C(no), SSL certificates are not validated. Use this only
on personally controlled sites using self-signed certificates.
- You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
type: bool
default: yes
timeout:
description:
- Specifies the timeout in seconds for communicating with the network device
for either connecting or sending commands. If the timeout is
exceeded before the operation is completed, the module will error.
type: int
ssh_keyfile:
description:
- Specifies the SSH keyfile to use to authenticate the connection to
the remote device. This argument is only used for I(cli) transports.
- You may omit this option by setting the environment variable C(ANSIBLE_NET_SSH_KEYFILE).
type: path
transport:
description:
- Configures the transport connection to use when connecting to the
remote device.
type: str
choices: [ cli, rest ]
default: rest
no_f5_teem:
description:
- If C(yes), TEEM telemetry data is not sent to F5.
- You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
- Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
default: no
type: bool
auth_provider:
description:
- Configures the auth provider for to obtain authentication tokens from the remote device.
- This option is really used when working with BIG-IQ devices.
type: str
notes:
- For more information on using Ansible to manage F5 Networks devices see U(https://www.ansible.com/integrations/networks/f5).
- Requires BIG-IP software version >= 12.
- The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP
specific configuration persists to disk, be sure to include at least one task that uses the
M(f5networks.f5_modules.bigip_config) module to save the running configuration. Refer to the module's documentation for
the correct usage of the module to save your running configuration.
'''

View File

@@ -0,0 +1,90 @@
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class ModuleDocFragment(object):
# Standard F5 documentation fragment
DOCUMENTATION = r'''
options:
provider:
description:
- A dict object containing connection details.
type: dict
version_added: "1.0.0"
suboptions:
password:
description:
- The password for the user account used to connect to the BIG-IP.
- You may omit this option by setting the environment variable C(F5_PASSWORD).
type: str
required: true
aliases: [ pass, pwd ]
server:
description:
- The BIG-IP host.
- You may omit this option by setting the environment variable C(F5_SERVER).
type: str
required: true
server_port:
description:
- The BIG-IP server port.
- You may omit this option by setting the environment variable C(F5_SERVER_PORT).
type: int
default: 22
user:
description:
- The username to connect to the BIG-IP with. This user must have
administrative privileges on the device.
- You may omit this option by setting the environment variable C(F5_USER).
type: str
required: true
validate_certs:
description:
- If C(no), SSL certificates are not validated. Use this only
on personally controlled sites using self-signed certificates.
- You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS).
type: bool
default: yes
timeout:
description:
- Specifies the timeout in seconds for communicating with the network device
for either connecting or sending commands. If the timeout is
exceeded before the operation is completed, the module will error.
type: int
ssh_keyfile:
description:
- Specifies the SSH keyfile to use to authenticate the connection to
the remote device. This argument is only used for I(cli) transports.
- You may omit this option by setting the environment variable C(ANSIBLE_NET_SSH_KEYFILE).
type: path
transport:
description:
- Configures the transport connection to use when connecting to the
remote device.
type: str
choices: ['cli']
default: cli
no_f5_teem:
description:
- If C(yes), TEEM telemetry data is not sent to F5.
- You may omit this option by setting the environment variable C(F5_TELEMETRY_OFF).
- Previously used variable C(F5_TEEM) is deprecated as its name was confusing.
default: no
type: bool
auth_provider:
description:
- Configures the auth provider for to obtain authentication tokens from the remote device.
- This option is really used when working with BIG-IQ devices.
type: str
notes:
- For more information on using Ansible to manage F5 Networks devices see U(https://www.ansible.com/integrations/networks/f5).
- Requires BIG-IP software version >= 12.
- The F5 modules only manipulate the running configuration of the F5 product. To ensure that BIG-IP
specific configuration persists to disk, be sure to include at least one task that uses the
M(f5networks.f5_modules.bigip_config) module to save the running configuration. Refer to the module's documentation for
the correct usage of the module to save your running configuration.
'''

View File

@@ -0,0 +1,15 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
def abspath(file):
return os.path.abspath(file)
class FilterModule(object):
def filters(self):
return {
'abspath': abspath
}

View File

@@ -0,0 +1,13 @@
from __future__ import absolute_import, division, print_function
__metaclass__ = type
class FilterModule(object):
def filters(self):
return {
'verchg': self.mark_devel
}
def mark_devel(self, var):
result = var.split('-')[0] + '-devel'
return result

View File

@@ -0,0 +1,154 @@
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2020, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: bigiq_license
author: Wojciech Wypior <w.wypior@f5.com>
version_added: "1.0"
short_description: Select a random license key from a pool of biqiq available licenses
description:
- Select a random license key from a pool of biqiq available licenses
,Requires specifying BIGIQ license pool name and connection parameters
"""
EXAMPLES = """
- name: Get a regkey license from a license pool
bigiq_regkey_license:
key: "{{ lookup('f5networks.f5_modules.bigiq_license', pool_name='foo_pool', username=baz, password=bar, host=192.168.1.1, port=10443}}"
state: present
pool: foo_pool
- name: Get a regkey license from a license pool, use default credentials and port, disable SSL verification
bigiq_regkey_license:
key: "{{ lookup('f5networks.f5_modules.bigiq_license', pool_name='foo_pool', host=192.168.1.1, validate_certs=false}}"
state: present
pool: foo_pool
"""
RETURN = """
_raw:
description:
- random item
"""
import random
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
from ansible_collections.f5networks.f5_modules.plugins.module_utils.bigiq import F5RestClient
class LookupModule(LookupBase):
def __init__(self, loader=None, templar=None, **kwargs):
super(LookupModule, self).__init__(loader, templar, **kwargs)
self.username = None
self.password = None
self.validate_certs = False
self.host = None
self.pool_name = None
self.port = 443
self.client = None
self.params = None
def _validate_and_merge_params(self, **kwargs):
self.username = kwargs.pop('username', 'admin')
self.password = kwargs.pop('password', 'admin')
self.validate_certs = kwargs.pop('validate_certs', False)
self.host = kwargs.pop('host', None)
self.port = kwargs.pop('port', 443)
self.pool_name = kwargs.pop('pool_name', None)
if self.host is None:
raise AnsibleError('A valid hostname or IP for BIGIQ needs to be provided')
if self.pool_name is None:
raise AnsibleError('License pool name needs to be specified')
self.params = dict(
provider=dict(
server=self.host,
server_port=self.port,
validate_certs=self.validate_certs,
user=self.username,
password=self.password
)
)
def _get_pool_uuid(self):
uri = "https://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses".format(self.host, self.port)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise AnsibleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise AnsibleError(response['message'])
else:
raise AnsibleError(resp.content)
if 'items' not in response:
raise AnsibleError('No license pools configured on BIGIQ')
resource = next((x for x in response['items'] if x['name'] == self.pool_name), None)
if resource is None:
raise AnsibleError("Could not find the specified license pool.")
return resource['id']
def _get_registation_keys(self, pool_id):
uri = 'https://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}/offerings/'.format(
self.host,
self.port,
pool_id,
)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise AnsibleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise AnsibleError(response['message'])
else:
raise AnsibleError(resp.content)
regkeys = [x['regKey'] for x in response['items']]
if not regkeys:
raise AnsibleError('Failed to obtain registration keys')
return regkeys
def run(self, terms, variables=None, **kwargs):
self._validate_and_merge_params(**kwargs)
self.client = F5RestClient(**self.params)
pool_id = self._get_pool_uuid()
regkeys = self._get_registation_keys(pool_id)
keys = []
regkeypool = []
for key in regkeys:
uri = 'https://{0}:{1}/mgmt/cm/device/licensing/pool/regkey/licenses/{2}/offerings/{3}/members'.format(
self.host,
self.port,
pool_id,
key
)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise AnsibleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise AnsibleError(response['message'])
else:
raise AnsibleError(resp.content)
if not response['items']:
keys.append(key)
result = random.choice(keys)
regkeypool.append(result)
return regkeypool

View File

@@ -0,0 +1,73 @@
# (c) 2013, Michael DeHaan <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: Select a random license key from a file and remove it from future lookups
author: Tim Rupp <caphrim007@gmail.com>
version_added: "1.0"
short_description: Return random license from list
description:
- Select a random license key from a file and remove it from future lookups
- Can optionally remove the key if C(remove=True) is specified
"""
EXAMPLES = """
- name: Get a regkey license from a stash without deleting it
bigiq_regkey_license:
key: "{{ lookup('license_hopper', 'filename=/path/to/licenses.txt') }}"
state: present
pool: regkey1
- name: Get a regkey license from a stash and delete the key from the file
bigiq_regkey_license:
key: "{{ lookup('license_hopper', 'filename=/path/to/licenses.txt', remove=True) }}"
state: present
pool: regkey1
"""
RETURN = """
_raw:
description:
- random item
"""
import random
from ansible.errors import AnsibleError
from ansible.module_utils._text import to_native
from ansible.plugins.lookup import LookupBase
BOOLEANS_TRUE = frozenset(('y', 'yes', 'on', '1', 'true', 'True', 't', 1, 1.0, True))
class LookupModule(LookupBase):
def __init__(self, loader=None, templar=None, **kwargs):
super(LookupModule, self).__init__(loader, templar, **kwargs)
self.filename = None
self.remove = False
def run(self, terms, variables=None, **kwargs):
self.filename = kwargs.pop('filename', None)
self.remove = kwargs.pop('remove', False)
if self.filename is None:
raise AnsibleError("No 'filename' was specified")
lookupfile = self.find_file_in_search_path(variables, 'files', self.filename)
if lookupfile is None:
raise AnsibleError("Could not find the specified 'filename'")
fh = open(lookupfile, 'r')
lines = [x.strip() for x in fh.readlines()]
fh.close()
try:
ret = [random.choice(lines)]
except Exception as e:
raise AnsibleError("Unable to choose random license: %s" % to_native(e))
if self.remove:
to_write = [x + "\n" for x in lines if x != ret[0]]
fh = open(lookupfile, 'w')
fh.writelines(to_write)
return ret

View File

@@ -0,0 +1,113 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import time
from .common import (
F5BaseClient, F5ModuleError
)
from .constants import (
LOGIN, BASE_HEADERS
)
from .icontrol import iControlRestSession
class F5RestClient(F5BaseClient):
def __init__(self, *args, **kwargs):
super(F5RestClient, self).__init__(*args, **kwargs)
self.provider = self.merge_provider_params()
self.headers = BASE_HEADERS
self.retries = 0
@property
def api(self):
if self._client:
return self._client
session, err = self.connect_via_token_auth()
if err or session is None:
session, err = self.connect_via_basic_auth()
if err or session is None:
raise F5ModuleError(err)
self._client = session
return session
def connect_via_token_auth(self):
url = "https://{0}:{1}{2}".format(
self.provider['server'], self.provider['server_port'], LOGIN
)
payload = {
'username': self.provider['user'],
'password': self.provider['password'],
'loginProviderName': self.provider['auth_provider'] or 'tmos'
}
session = iControlRestSession(
validate_certs=self.provider['validate_certs']
)
response = session.post(
url,
json=payload,
headers=self.headers
)
if response.status not in [200]:
if b'Configuration Utility restarting...' in response.content and self.retries < 3:
time.sleep(30)
self.retries += 1
return self.connect_via_token_auth()
else:
self.retries = 0
return None, response.content
self.retries = 0
session.request.headers['X-F5-Auth-Token'] = response.json()['token']['token']
if 'timeout' in self.provider and self.provider['timeout'] is not None:
token_value = response.json()['token']['token']
self.modify_token_timeout(session, token_value, self.provider['timeout'])
return session, None
def connect_via_basic_auth(self):
url = "https://{0}:{1}/mgmt/tm/sys".format(
self.provider['server'], self.provider['server_port']
)
session = iControlRestSession(
url_username=self.provider['user'],
url_password=self.provider['password'],
validate_certs=self.provider['validate_certs'],
)
response = session.get(
url,
headers=self.headers
)
if response.status not in [200]:
if b'Configuration Utility restarting...' in response.content and self.retries < 3:
time.sleep(30)
self.retries += 1
return self.connect_via_basic_auth()
else:
self.retries = 0
return None, response.content
self.retries = 0
return session, None
def modify_token_timeout(self, client_session, token_value, token_timeout):
url = "https://{0}:{1}/mgmt/shared/authz/tokens/{2}".format(
self.provider['server'], self.provider['server_port'], token_value
)
payload = {
'timeout': token_timeout
}
response = client_session.patch(
url,
json=payload
)
if response.status not in [200]:
raise F5ModuleError(response.content)
return None

View File

@@ -0,0 +1,162 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
from .common import (
F5BaseClient, F5ModuleError
)
from .constants import (
LOGIN, BASE_HEADERS
)
from .icontrol import iControlRestSession
class F5RestClient(F5BaseClient):
def __init__(self, *args, **kwargs):
super(F5RestClient, self).__init__(*args, **kwargs)
self.provider = self.merge_provider_params()
self.headers = BASE_HEADERS
self.access_token = None
self.refresh_token = None
@property
def api(self):
if self._client:
return self._client
session, err = self.connect_via_token_auth()
if err:
raise F5ModuleError(err)
self._client = session
return session
def connect_via_token_auth(self):
provider = self.provider['auth_provider'] or 'local'
url = "https://{0}:{1}{2}".format(
self.provider['server'], self.provider['server_port'], LOGIN
)
payload = {
'username': self.provider['user'],
'password': self.provider['password'],
}
# - local is a special provider that is baked into the system and
# has no loginReference
if provider != 'local':
login_ref = self.get_login_ref(provider)
payload.update(login_ref)
session = iControlRestSession(
validate_certs=self.provider['validate_certs']
)
response = session.post(
url,
json=payload,
headers=self.headers
)
if response.status not in [200]:
return None, response.content
self.access_token = response.json()['token']['token']
self.refresh_token = response.json()['refreshToken']['token']
session.request.headers['X-F5-Auth-Token'] = self.access_token
return session, None
def get_login_ref(self, provider):
info = self.read_provider_info_from_device()
uuids = [os.path.basename(os.path.dirname(x['link'])) for x in info['providers'] if '-' in x['link']]
if provider in uuids:
link = self._get_login_ref_by_id(info, provider)
if not link:
raise F5ModuleError(
"Provider with the UUID {0} was not found.".format(provider)
)
return dict(
loginReference=dict(
link=link
)
)
names = [os.path.basename(os.path.dirname(x['link'])) for x in info['providers'] if '-' in x['link']]
if names.count(provider) > 1:
raise F5ModuleError(
"Ambiguous auth_provider name provided. Please specify a specific provider name or UUID."
)
link = self._get_login_ref_by_name(info, provider)
if not link:
raise F5ModuleError(
"Provider with the name '{0}' was not found.".format(provider)
)
return dict(
loginReference=dict(
link=link
)
)
@staticmethod
def _get_login_ref_by_id(info, provider):
provider = '/' + provider + '/'
for x in info['providers']:
if x['link'].find(provider) > -1:
return x['link']
@staticmethod
def _get_login_ref_by_name(info, provider):
for x in info['providers']:
if x['name'] == provider:
return x['link']
return None
def read_provider_info_from_device(self):
uri = "https://{0}:{1}/info/system".format(
self.provider['server'], self.provider['server_port']
)
session = iControlRestSession()
session.verify = self.provider['validate_certs']
resp = session.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return response
def reconnect(self):
url = "https://{0}:{1}/mgmt/shared/authn/exchange".format(
self.provider['server'], self.provider['server_port']
)
payload = {
'refreshToken': {
'token': self.refresh_token
}
}
session = iControlRestSession(
validate_certs=self.provider['validate_certs']
)
response = session.post(
url,
json=payload,
headers=BASE_HEADERS
)
if response.status not in [200]:
raise F5ModuleError('Failed to refresh token, server returned: {0}'.format(response.content))
self.access_token = response.json()['token']['token']
self.refresh_token = response.json()['refreshToken']['token']
session.request.headers['X-F5-Auth-Token'] = self.access_token
self._client = session

View File

@@ -0,0 +1,670 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import copy
import os
import re
import datetime
from ansible.module_utils._text import to_text
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.connection import exec_command
from ansible.module_utils.six import iteritems
from ansible.module_utils.parsing.convert_bool import (
BOOLEANS_TRUE, BOOLEANS_FALSE
)
from collections import defaultdict
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.config import (
NetworkConfig, ConfigLine, ignore_line
)
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
to_list, ComplexList
)
from .constants import (
MANAGED_BY_ANNOTATION_MODIFIED, MANAGED_BY_ANNOTATION_VERSION
)
f5_provider_spec = {
'server': dict(
required=True,
fallback=(env_fallback, ['F5_SERVER'])
),
'server_port': dict(
type='int',
default=443,
fallback=(env_fallback, ['F5_SERVER_PORT'])
),
'user': dict(
required=True,
fallback=(env_fallback, ['F5_USER', 'ANSIBLE_NET_USERNAME'])
),
'password': dict(
required=True,
no_log=True,
aliases=['pass', 'pwd'],
fallback=(env_fallback, ['F5_PASSWORD', 'ANSIBLE_NET_PASSWORD']),
),
'validate_certs': dict(
type='bool',
default='yes',
fallback=(env_fallback, ['F5_VALIDATE_CERTS'])
),
'transport': dict(
choices=['rest'],
default='rest'
),
'timeout': dict(type='int'),
'no_f5_teem': dict(
type='bool',
default='no',
fallback=(env_fallback, ['F5_TEEM', 'F5_TELEMETRY_OFF'])
),
'auth_provider': dict(),
}
f5_argument_spec = {
'provider': dict(type='dict', options=f5_provider_spec),
}
def get_provider_argspec():
return f5_provider_spec
def load_params(params):
provider = params.get('provider') or dict()
for key, value in iteritems(provider):
if key in f5_argument_spec:
if params.get(key) is None and value is not None:
params[key] = value
def is_empty_list(seq):
if len(seq) == 1:
if seq[0] == '' or seq[0] == 'none':
return True
return False
def fq_name(partition, value, sub_path=''):
"""Returns a 'Fully Qualified' name
A BIG-IP expects most names of resources to be in a fully-qualified
form. This means that both the simple name, and the partition need
to be combined.
The Ansible modules, however, can accept (as names for several
resources) their name in the FQ format. This becomes an issue when
the FQ name and the partition are both specified as separate values.
Consider the following examples.
# Name not FQ
name: foo
partition: Common
# Name FQ
name: /Common/foo
partition: Common
This method will rectify the above situation and will, in both cases,
return the following for name.
/Common/foo
Args:
partition (string): The partition that you would want attached to
the name if the name has no partition.
value (string): The name that you want to attach a partition to.
This value will be returned unchanged if it has a partition
attached to it already.
sub_path (string): The sub path element. If defined the sub_path
will be inserted between partition and value.
This will also work on FQ names.
Returns:
string: The fully qualified name, given the input parameters.
"""
if value is not None and sub_path == '':
try:
int(value)
return '/{0}/{1}'.format(partition, value)
except (ValueError, TypeError):
if not value.startswith('/'):
return '/{0}/{1}'.format(partition, value)
if value is not None and sub_path != '':
try:
int(value)
return '/{0}/{1}/{2}'.format(partition, sub_path, value)
except (ValueError, TypeError):
if value.startswith('/'):
dummy, partition, name = value.split('/')
return '/{0}/{1}/{2}'.format(partition, sub_path, name)
if not value.startswith('/'):
return '/{0}/{1}/{2}'.format(partition, sub_path, value)
return value
# Fully Qualified name (with partition) for a list
def fq_list_names(partition, list_names):
if list_names is None:
return None
return map(lambda x: fq_name(partition, x), list_names)
def to_commands(module, commands):
spec = {
'command': dict(key=True),
'prompt': dict(),
'answer': dict()
}
transform = ComplexList(spec, module)
return transform(commands)
def run_commands(module, commands, check_rc=True):
responses = list()
commands = to_commands(module, to_list(commands))
for cmd in commands:
cmd = module.jsonify(cmd)
rc, out, err = exec_command(module, cmd)
if check_rc and rc != 0:
raise F5ModuleError(to_text(err, errors='surrogate_then_replace'))
result = to_text(out, errors='surrogate_then_replace')
responses.append(result)
return responses
def flatten_boolean(value):
truthy = list(BOOLEANS_TRUE) + ['enabled', 'True', 'true']
falsey = list(BOOLEANS_FALSE) + ['disabled', 'False', 'false']
if value is None:
return None
elif value in truthy:
return 'yes'
elif value in falsey:
return 'no'
def is_cli(module):
transport = module.params.get('transport', None)
provider_transport = (module.params['provider'] or {}).get('transport')
result = 'cli' in (transport, provider_transport)
return result
def is_valid_hostname(host):
"""Reasonable attempt at validating a hostname
Compiled from various paragraphs outlined here
https://tools.ietf.org/html/rfc3696#section-2
https://tools.ietf.org/html/rfc1123
Notably,
* Host software MUST handle host names of up to 63 characters and
SHOULD handle host names of up to 255 characters.
* The "LDH rule", after the characters that it permits. (letters, digits, hyphen)
* If the hyphen is used, it is not permitted to appear at
either the beginning or end of a label
:param host:
:return:
"""
if len(host) > 255:
return False
host = host.rstrip(".")
allowed = re.compile(r'(?!-)[A-Z0-9-]{1,63}(?<!-)$', re.IGNORECASE)
result = all(allowed.match(x) for x in host.split("."))
return result
def is_valid_fqdn(host):
"""Reasonable attempt at validating a hostname
Compiled from various paragraphs outlined here
https://tools.ietf.org/html/rfc3696#section-2
https://tools.ietf.org/html/rfc1123
Notably,
* Host software MUST handle host names of up to 63 characters and
SHOULD handle host names of up to 255 characters.
* The "LDH rule", after the characters that it permits. (letters, digits, hyphen)
* If the hyphen is used, it is not permitted to appear at
either the beginning or end of a label
:param host:
:return:
"""
if len(host) > 255:
return False
host = host.rstrip(".")
allowed = re.compile(r'(?!-)[A-Z0-9-*]{1,63}(?<!-)$', re.IGNORECASE)
result = all(allowed.match(x) for x in host.split("."))
if result:
parts = host.split('.')
if len(parts) > 1:
return True
return False
def transform_name(partition='', name='', sub_path=''):
if partition != '':
if name.startswith(partition + '/'):
name = name.replace(partition + '/', '')
if name.startswith('/' + partition + '/'):
name = name.replace('/' + partition + '/', '')
if name:
name = name.replace('/', '~')
name = name.replace('%', '%25')
if partition:
partition = partition.replace('/', '~')
if not partition.startswith('~'):
partition = '~' + partition
else:
if sub_path:
raise F5ModuleError(
'When giving the subPath component include partition as well.'
)
if sub_path and partition:
sub_path = '~' + sub_path
if name and partition:
name = '~' + name
result = partition + sub_path + name
return result
def is_ansible_debug(module):
if module._debug and module._verbosity >= 4:
return True
return False
def is_uuid(uuid=None):
"""Check to see if value is an F5 UUID
UUIDs are used in BIG-IQ and in select areas of BIG-IP (notably ASM). This method
will check to see if the provided value matches a UUID as known by these products.
Args:
uuid (string): The value to check for UUID-ness
Returns:
bool:
"""
if uuid is None:
return False
pattern = r'[A-Za-z0-9]{8}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{12}'
if re.match(pattern, uuid):
return True
return False
def on_bigip():
if os.path.exists('/usr/bin/tmsh'):
return True
return False
def mark_managed_by(ansible_version, params):
metadata = []
result = copy.deepcopy(params)
found1 = False
found2 = False
mark1 = dict(
name=MANAGED_BY_ANNOTATION_VERSION,
value=ansible_version,
persist='true'
)
mark2 = dict(
name=MANAGED_BY_ANNOTATION_MODIFIED,
value=str(datetime.datetime.utcnow()),
persist='true'
)
if 'metadata' not in result:
result['metadata'] = [mark1, mark2]
return result
for x in params['metadata']:
if x['name'] == MANAGED_BY_ANNOTATION_VERSION:
found1 = True
metadata.append(mark1)
if x['name'] == MANAGED_BY_ANNOTATION_MODIFIED:
found2 = True
metadata.append(mark1)
else:
metadata.append(x)
if not found1:
metadata.append(mark1)
if not found2:
metadata.append(mark2)
result['metadata'] = metadata
return result
def only_has_managed_metadata(metadata):
managed = [
MANAGED_BY_ANNOTATION_MODIFIED,
MANAGED_BY_ANNOTATION_VERSION,
]
for x in metadata:
if x['name'] not in managed:
return False
return True
def merge_two_dicts(x, y):
""" Merge any two dicts passed to the function
This does not do a deep copy, just a shallow
copy. However, it does create a new object,
so there's that.
"""
z = x.copy()
z.update(y)
return z
class Noop(object):
"""Represent no-operation required
This class is used in the Difference engine to specify when an attribute
has not changed. Difference attributes may return an instance of this
class as a means to indicate when the attribute has not changed.
The Noop object allows attributes to be set to None when sending updates
to the API. `None` is technically a valid value in some cases (it indicates
that the attribute should be removed from the resource).
"""
pass
class F5BaseClient(object):
def __init__(self, *args, **kwargs):
self.params = kwargs
self.module = kwargs.get('module', None)
load_params(self.params)
self._client = None
@property
def api(self):
raise F5ModuleError("Management root must be used from the concrete product classes.")
def reconnect(self):
"""Attempts to reconnect to a device
The existing token from a ManagementRoot can become invalid if you,
for example, upgrade the device (such as is done in the *_software
module.
This method can be used to reconnect to a remote device without
having to re-instantiate the ArgumentSpec and AnsibleF5Client classes
it will use the same values that were initially provided to those
classes
:return:
:raises iControlUnexpectedHTTPError
"""
self._client = None
@staticmethod
def validate_params(key, store):
if key in store and store[key] is not None:
return True
else:
return False
def merge_provider_params(self):
result = dict()
provider = self.params.get('provider', None)
if not provider:
provider = {}
self.merge_provider_server_param(result, provider)
self.merge_provider_server_port_param(result, provider)
self.merge_provider_validate_certs_param(result, provider)
self.merge_provider_auth_provider_param(result, provider)
self.merge_provider_user_param(result, provider)
self.merge_provider_timeout_param(result, provider)
self.merge_provider_password_param(result, provider)
self.merge_provider_no_f5_teem_param(result, provider)
return result
def merge_provider_server_param(self, result, provider):
if self.validate_params('server', provider):
result['server'] = provider['server']
elif self.validate_params('F5_SERVER', os.environ):
result['server'] = os.environ['F5_SERVER']
else:
raise F5ModuleError('Server parameter cannot be None or missing, please provide a valid value')
def merge_provider_server_port_param(self, result, provider):
if self.validate_params('server_port', provider):
result['server_port'] = provider['server_port']
elif self.validate_params('F5_SERVER_PORT', os.environ):
result['server_port'] = os.environ['F5_SERVER_PORT']
else:
result['server_port'] = 443
def merge_provider_validate_certs_param(self, result, provider):
if self.validate_params('validate_certs', provider):
result['validate_certs'] = provider['validate_certs']
elif self.validate_params('F5_VALIDATE_CERTS', os.environ):
result['validate_certs'] = os.environ['F5_VALIDATE_CERTS']
else:
result['validate_certs'] = True
if result['validate_certs'] in BOOLEANS_TRUE:
result['validate_certs'] = True
else:
result['validate_certs'] = False
def merge_provider_auth_provider_param(self, result, provider):
if self.validate_params('auth_provider', provider):
result['auth_provider'] = provider['auth_provider']
elif self.validate_params('F5_AUTH_PROVIDER', os.environ):
result['auth_provider'] = os.environ['F5_AUTH_PROVIDER']
else:
result['auth_provider'] = None
# Handle a specific case of the user specifying ``|default(omit)``
# as the value to the auth_provider.
#
# In this case, Ansible will inject the omit-placeholder value
# and the module params incorrectly interpret this. This case
# can occur when specifying ``|default(omit)`` for a variable
# value defined in the ``environment`` section of a Play.
#
# An example of the omit placeholder is shown below.
#
# __omit_place_holder__11bd71a2840bff144594b9cc2149db814256f253
#
if result['auth_provider'] is not None and '__omit_place_holder__' in result['auth_provider']:
result['auth_provider'] = None
def merge_provider_user_param(self, result, provider):
if self.validate_params('user', provider):
result['user'] = provider['user']
elif self.validate_params('F5_USER', os.environ):
result['user'] = os.environ.get('F5_USER')
elif self.validate_params('ANSIBLE_NET_USERNAME', os.environ):
result['user'] = os.environ.get('ANSIBLE_NET_USERNAME')
else:
result['user'] = None
def merge_provider_timeout_param(self, result, provider):
if self.validate_params('timeout', provider):
result['timeout'] = provider['timeout']
else:
result['timeout'] = None
def merge_provider_password_param(self, result, provider):
if self.validate_params('password', provider):
result['password'] = provider['password']
elif self.validate_params('F5_PASSWORD', os.environ):
result['password'] = os.environ.get('F5_PASSWORD')
elif self.validate_params('ANSIBLE_NET_PASSWORD', os.environ):
result['password'] = os.environ.get('ANSIBLE_NET_PASSWORD')
else:
result['password'] = None
def merge_provider_no_f5_teem_param(self, result, provider):
if self.validate_params('no_f5_teem', provider):
result['no_f5_teem'] = provider['no_f5_teem']
elif self.validate_params('F5_TEEM', os.environ):
result['no_f5_teem'] = os.environ['F5_TEEM']
elif self.validate_params('F5_TELEMETRY_OFF', os.environ):
result['no_f5_teem'] = os.environ['F5_TELEMETRY_OFF']
else:
result['no_f5_teem'] = False
if result['no_f5_teem'] in BOOLEANS_TRUE:
result['no_f5_teem'] = True
else:
result['no_f5_teem'] = False
class AnsibleF5Parameters(object):
def __init__(self, *args, **kwargs):
self._values = defaultdict(lambda: None)
self._values['__warnings'] = []
self.client = kwargs.pop('client', None)
self._module = kwargs.pop('module', None)
self._params = {}
params = kwargs.pop('params', None)
if params:
self.update(params=params)
self._params.update(params)
def update(self, params=None):
if params:
self._params.update(params)
for k, v in iteritems(params):
# Adding this here because ``username`` is a connection parameter
# and in cases where it is also an API parameter, we run the risk
# of overriding the specified parameter with the connection parameter.
#
# Since this is a problem, and since "username" is never a valid
# parameter outside its usage in connection params (where we do not
# use the ApiParameter or ModuleParameters classes) it is safe to
# skip over it if it is provided.
if k == 'password':
continue
if self.api_map is not None and k in self.api_map:
map_key = self.api_map[k]
else:
map_key = k
# Handle weird API parameters like `dns.proxy.__iter__` by
# using a map provided by the module developer
class_attr = getattr(type(self), map_key, None)
if isinstance(class_attr, property):
# There is a mapped value for the api_map key
if class_attr.fset is None:
# If the mapped value does not have
# an associated setter
self._values[map_key] = v
else:
# The mapped value has a setter
setattr(self, map_key, v)
else:
# If the mapped value is not a @property
self._values[map_key] = v
def api_params(self):
result = {}
for api_attribute in self.api_attributes:
if self.api_map is not None and api_attribute in self.api_map:
result[api_attribute] = getattr(self, self.api_map[api_attribute])
else:
result[api_attribute] = getattr(self, api_attribute)
result = self._filter_params(result)
return result
def __getattr__(self, item):
# Ensures that properties that weren't defined, and therefore stashed
# in the `_values` dict, will be retrievable.
return self._values[item]
@property
def partition(self):
if self._values['partition'] is None:
return 'Common'
return self._values['partition'].strip('/')
@partition.setter
def partition(self, value):
self._values['partition'] = value
def _filter_params(self, params):
return dict((k, v) for k, v in iteritems(params) if v is not None)
class ImishConfig(NetworkConfig):
def add(self, lines, parents=None, duplicates=False):
ancestors = list()
offset = 0
obj = None
# global config command
if not parents:
for line in lines:
# handle ignore lines
if ignore_line(line):
continue
item = ConfigLine(line)
item.raw = line
if item not in self.items:
self.items.append(item)
else:
for index, p in enumerate(parents):
try:
i = index + 1
obj = self.get_block(parents[:i])[0]
ancestors.append(obj)
except ValueError:
# add parent to config
offset = index * self._indent
obj = ConfigLine(p)
obj.raw = p.rjust(len(p) + offset)
if ancestors:
obj._parents = list(ancestors)
ancestors[-1]._children.append(obj)
self.items.append(obj)
ancestors.append(obj)
# add child objects
for line in lines:
# handle ignore lines
if ignore_line(line):
continue
# check if child already exists
for child in ancestors[-1]._children:
if child.text == line and not duplicates:
break
else:
offset = len(parents) * self._indent
item = ConfigLine(line)
item.raw = line.rjust(len(line) + offset)
item._parents = ancestors
ancestors[-1]._children.append(item)
self.items.append(item)
class F5ModuleError(Exception):
pass

View File

@@ -0,0 +1,84 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible.module_utils.six import iteritems
def cmp_simple_list(want, have):
if want is None:
return None
if have is None and want in ['', 'none']:
return None
if have is not None and want in ['', 'none']:
return []
if have is None:
return want
if set(want) != set(have):
return want
return None
def cmp_str_with_none(want, have):
if want is None:
return None
if have is None and want == '':
return None
if want != have:
return want
def compare_complex_list(want, have):
"""Performs a complex list comparison
A complex list is a list of dictionaries
Args:
want (list): List of dictionaries to compare with second parameter.
have (list): List of dictionaries to compare with first parameter.
Returns:
bool:
"""
if want == [] and have is None:
return None
if want is None:
return None
w = []
h = []
for x in want:
tmp = [(str(k), str(v)) for k, v in iteritems(x)]
w += tmp
for x in have:
tmp = [(str(k), str(v)) for k, v in iteritems(x)]
h += tmp
if set(w) == set(h):
return None
else:
return want
def compare_dictionary(want, have):
"""Performs a dictionary comparison
Args:
want (dict): Dictionary to compare with second parameter.
have (dict): Dictionary to compare with first parameter.
Returns:
bool:
"""
if want == {} and have is None:
return None
if want is None:
return None
w = [(str(k), str(v)) for k, v in iteritems(want)]
h = [(str(k), str(v)) for k, v in iteritems(have)]
if set(w) == set(h):
return None
else:
return want

View File

@@ -0,0 +1,48 @@
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2020, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
BASE_HEADERS = {'Content-Type': 'application/json'}
MANAGED_BY_ANNOTATION_VERSION = 'f5-ansible.version'
MANAGED_BY_ANNOTATION_MODIFIED = 'f5-ansible.last_modified'
LOGIN = '/mgmt/shared/authn/login'
LOGOUT = '/mgmt/shared/authz/tokens/'
PLATFORM = {
'bigip': 'BIG-IP',
'bigiq': 'BIG-IQ'
}
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
TEEM_ENDPOINT = 'product.apis.f5.com',
TEEM_KEY = 'mmhJU2sCd63BznXAXDh4kxLIyfIMm3Ar'
TEEM_TIMEOUT = 10
TEEM_VERIFY = False
CICD_ENV = {
'bamboo.buildKey': 'Bamboo',
'DRONE': 'Drone CI',
'BUILDKITE': 'Buildkite',
'CIRCLECI': 'Circle CI',
'CIRRUS_CI': 'Cirrus CI',
'CODEBUILD_BUILD_ID': 'AWS CodeBuild',
'GITHUB_ACTIONS': 'GitHub Actions',
'GITLAB_CI': 'GitLab CI',
'HUDSON_URL': 'Hudson CI',
'JENKINS_URL': 'Jenkins CI',
'TF_BUILD': 'Azure Pipelines',
'HEROKU_TEST_RUN_ID': 'Heroku CI',
'TEAMCITY_VERSION': 'TeamCity',
'TRAVIS': 'Travis CI',
'CI_NAME': 'CodeShip CI'
}

View File

@@ -0,0 +1,681 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
try:
from BytesIO import BytesIO
except ImportError:
from io import BytesIO
from ansible.module_utils.urls import urlparse
from ansible.module_utils.urls import generic_urlparse
from ansible.module_utils.urls import Request
try:
import json as _json
except ImportError:
import simplejson as _json
from .common import F5ModuleError
"""An F5 REST API URI handler.
Use this module to make calls to an F5 REST server. It is influenced by the same
API that the Python ``requests`` tool uses, but the two are not the same, as the
library here is **much** more simple and targeted specifically to F5's needs.
The ``requests`` design was chosen due to familiarity with the tool. Internally,
the classes contained herein use Ansible native libraries.
The means by which you should use it are similar to ``requests`` basic usage.
Authentication is not handled for you automatically by this library, however it *is*
handled automatically for you in the supporting F5 module_utils code; specifically the
different product module_util files (bigip.py, bigiq.py, etc).
Internal (non-module) usage of this library looks like this.
```
# Create a session instance
mgmt = iControlRestSession()
mgmt.verify = False
server = '1.1.1.1'
port = 443
# Payload used for getting an initial authentication token
payload = {
'username': 'admin',
'password': 'secret',
'loginProviderName': 'tmos'
}
# Create URL to call, injecting server and port
url = f"https://{server}:{port}/mgmt/shared/authn/login"
# Call the API
resp = session.post(url, json=payload)
# View the response
print(resp.json())
# Update the session with the authentication token
session.headers['X-F5-Auth-Token'] = resp.json()['token']['token']
# Create another URL to call, injecting server and port
url = f"https://{server}:{port}/mgmt/tm/ltm/virtual/~Common~virtual1"
# Call the API
resp = session.get(url)
# View the details of a virtual payload
print(resp.json())
```
"""
from ansible.module_utils.six.moves.urllib.error import HTTPError
from .constants import (
LOGOUT, BASE_HEADERS
)
class Response(object):
def __init__(self):
self._content = None
self.status = None
self.headers = dict()
self.url = None
self.reason = None
self.request = None
self.msg = None
@property
def content(self):
return self._content
@property
def raw_content(self):
return self._content
def json(self):
return _json.loads(self._content or 'null')
@property
def ok(self):
if self.status is not None and int(self.status) > 400:
return False
try:
response = self.json()
if 'code' in response and response['code'] > 400:
return False
except ValueError:
pass
return True
class iControlRestSession(object):
"""Represents a session that communicates with a BigIP.
This acts as a loose wrapper around Ansible's ``Request`` class. We're doing
this as interim work until we move to the httpapi connector.
"""
def __init__(self, headers=None, use_proxy=True, force=False, timeout=120,
validate_certs=True, url_username=None, url_password=None,
http_agent=None, force_basic_auth=False, follow_redirects='urllib2',
client_cert=None, client_key=None, cookies=None):
self.request = Request(
headers=headers,
use_proxy=use_proxy,
force=force,
timeout=timeout,
validate_certs=validate_certs,
url_username=url_username,
url_password=url_password,
http_agent=http_agent,
force_basic_auth=force_basic_auth,
follow_redirects=follow_redirects,
client_cert=client_cert,
client_key=client_key,
cookies=cookies
)
self.last_url = None
def get_headers(self, result):
try:
return dict(result.getheaders())
except AttributeError:
return result.headers
def update_response(self, response, result):
response.headers = self.get_headers(result)
response._content = result.read()
response.status = result.getcode()
response.url = result.geturl()
response.msg = "OK (%s bytes)" % response.headers.get('Content-Length', 'unknown')
def send(self, method, url, **kwargs):
response = Response()
# Set the last_url called
#
# This is used by the object destructor to erase the token when the
# ModuleManager exits and destroys the iControlRestSession object
self.last_url = url
body = None
data = kwargs.pop('data', None)
json = kwargs.pop('json', None)
if not data and json is not None:
self.request.headers.update(BASE_HEADERS)
body = _json.dumps(json)
if not isinstance(body, bytes):
body = body.encode('utf-8')
if data:
body = data
if body:
kwargs['data'] = body
try:
result = self.request.open(method, url, **kwargs)
except HTTPError as e:
# Catch HTTPError delivered from Ansible
#
# The structure of this object, in Ansible 2.8 is
#
# HttpError {
# args
# characters_written
# close
# code
# delete
# errno
# file
# filename
# filename2
# fp
# getcode
# geturl
# hdrs
# headers
# info
# msg
# name
# reason
# strerror
# url
# with_traceback
# }
self.update_response(response, e)
return response
self.update_response(response, result)
return response
def delete(self, url, **kwargs):
return self.send('DELETE', url, **kwargs)
def get(self, url, **kwargs):
return self.send('GET', url, **kwargs)
def patch(self, url, data=None, **kwargs):
return self.send('PATCH', url, data=data, **kwargs)
def post(self, url, data=None, **kwargs):
return self.send('POST', url, data=data, **kwargs)
def put(self, url, data=None, **kwargs):
return self.send('PUT', url, data=data, **kwargs)
def __del__(self):
if self.last_url is None:
return
token = self.request.headers.get('X-F5-Auth-Token', None)
if not token:
return
try:
p = generic_urlparse(urlparse(self.last_url))
uri = "https://{0}:{1}{2}{3}".format(
p['hostname'], p['port'], LOGOUT, token
)
self.delete(uri)
except ValueError:
pass
class TransactionContextManager(object):
def __init__(self, client, validate_only=False):
self.client = client
self.validate_only = validate_only
self.transid = None
def __enter__(self):
uri = "https://{0}:{1}/mgmt/tm/transaction/".format(
self.client.provider['server'],
self.client.provider['server_port']
)
resp = self.client.api.post(uri, json={})
if resp.status not in [200]:
raise Exception
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
self.transid = response['transId']
self.client.api.request.headers['X-F5-REST-Coordination-Id'] = self.transid
return self.client
def __exit__(self, exc_type, exc_value, exc_tb):
self.client.api.request.headers.pop('X-F5-REST-Coordination-Id')
if exc_tb is None:
uri = "https://{0}:{1}/mgmt/tm/transaction/{2}".format(
self.client.provider['server'],
self.client.provider['server_port'],
self.transid
)
params = dict(
state="VALIDATING",
validateOnly=self.validate_only
)
resp = self.client.api.patch(uri, json=params)
if resp.status not in [200]:
raise Exception
def download_asm_file(client, url, dest, file_size):
"""Download a large ASM file from the remote device
This method handles issues with ASM file endpoints that allow
downloads of ASM objects on the BIG-IP, as well as handles
chunking of large files.
Arguments:
client (object): The F5RestClient connection object.
url (string): The URL to download.
dest (string): The location on (Ansible controller) disk to store the file.
file_size (integer): The size of the remote file.
Returns:
bool: No response on success. Fail otherwise.
"""
with open(dest, 'wb') as fileobj:
chunk_size = 512 * 1024
start = 0
end = chunk_size - 1
size = file_size
# current_bytes = 0
while True:
content_range = "%s-%s/%s" % (start, end, size)
headers = {
'Content-Range': content_range,
'Content-Type': 'application/json'
}
data = {
'headers': headers,
'verify': False,
'stream': False
}
response = client.api.get(url, headers=headers, json=data)
if response.status == 200:
if 'Content-Length' not in response.headers:
error_message = "The Content-Length header is not present."
raise F5ModuleError(error_message)
length = response.headers['Content-Length']
if int(length) > 0:
fileobj.write(response.content)
else:
error = "Invalid Content-Length value returned: %s ," \
"the value should be greater than 0" % length
raise F5ModuleError(error)
# fileobj.write(response.raw_content)
if end == size:
break
start += chunk_size
if start >= size:
break
if (end + chunk_size) > size:
end = size - 1
else:
end = start + chunk_size - 1
def download_file(client, url, dest):
"""Download a file from the remote device
This method handles the chunking needed to download a file from
a given URL on the BIG-IP.
Arguments:
client (object): The F5RestClient connection object.
url (string): The URL to download.
dest (string): The location on (Ansible controller) disk to store the file.
Returns:
bool: True on success. False otherwise.
"""
with open(dest, 'wb') as fileobj:
chunk_size = 512 * 1024
start = 0
end = chunk_size - 1
size = 0
current_bytes = 0
while True:
content_range = "%s-%s/%s" % (start, end, size)
headers = {
'Content-Range': content_range,
'Content-Type': 'application/octet-stream'
}
data = {
'headers': headers,
'verify': False,
'stream': False
}
response = client.api.get(url, headers=headers, json=data)
if response.status == 200:
# If the size is zero, then this is the first time through
# the loop and we don't want to write data because we
# haven't yet figured out the total size of the file.
if size > 0:
current_bytes += chunk_size
fileobj.write(response.raw_content)
# Once we've downloaded the entire file, we can break out of
# the loop
if end == size:
break
crange = response.headers['Content-Range']
# Determine the total number of bytes to read.
if size == 0:
size = int(crange.split('/')[-1]) - 1
# If the file is smaller than the chunk_size, the BigIP
# will return an HTTP 400. Adjust the chunk_size down to
# the total file size...
if chunk_size > size:
end = size
# ...and pass on the rest of the code.
continue
start += chunk_size
if (current_bytes + chunk_size) > size:
end = size
else:
end = start + chunk_size - 1
return True
def upload_file(client, url, src, dest=None):
"""Upload a file to an arbitrary URL.
This method is responsible for correctly chunking an upload request to an
arbitrary file worker URL.
Arguments:
client (object): The F5RestClient connection object.
url (string): The URL to upload a file to.
src (string): The file to be uploaded.
dest (string): The file name to create on the remote device.
Examples:
The ``dest`` may be either an absolute or relative path. The basename
of the path is used as the remote file name upon upload. For instance,
in the example below, ``BIGIP-13.1.0.8-0.0.3.iso`` would be the name
of the remote file.
The specified URL should be the full URL to where you want to upload a
file. BIG-IP has many different URLs that can be used to handle different
types of files. This is why a full URL is required.
>>> from ansible_collections.f5networks.f5_modules.plugins.module_utils.icontrol import upload_client
>>> url = 'https://{0}:{1}/mgmt/cm/autodeploy/software-image-uploads'.format(
... self.client.provider['server'],
... self.client.provider['server_port']
... )
>>> dest = '/path/to/BIGIP-13.1.0.8-0.0.3.iso'
>>> upload_file(self.client, url, dest)
True
Returns:
bool: True on success. False otherwise.
Raises:
F5ModuleError: Raised if ``retries`` limit is exceeded.
"""
if isinstance(src, StringIO) or isinstance(src, BytesIO):
fileobj = src
else:
fileobj = open(src, 'rb')
try:
size = os.stat(src).st_size
is_file = True
except TypeError:
src.seek(0, os.SEEK_END)
size = src.tell()
src.seek(0)
is_file = False
# This appears to be the largest chunk size that iControlREST can handle.
#
# The trade-off you are making by choosing a chunk size is speed, over size of
# transmission. A lower chunk size will be slower because a smaller amount of
# data is read from disk and sent via HTTP. Lots of disk reads are slower and
# There is overhead in sending the request to the BIG-IP.
#
# Larger chunk sizes are faster because more data is read from disk in one
# go, and therefore more data is transmitted to the BIG-IP in one HTTP request.
#
# If you are transmitting over a slow link though, it may be more reliable to
# transmit many small chunks that fewer large chunks. It will clearly take
# longer, but it may be more robust.
chunk_size = 1024 * 7168
start = 0
retries = 0
if dest is None and is_file:
basename = os.path.basename(src)
else:
basename = dest
url = '{0}/{1}'.format(url.rstrip('/'), basename)
while True:
if retries == 3:
# Retries are used here to allow the REST API to recover if you kill
# an upload mid-transfer.
#
# There exists a case where retrying a new upload will result in the
# API returning the POSTed payload (in bytes) with a non-200 response
# code.
#
# Retrying (after seeking back to 0) seems to resolve this problem.
raise F5ModuleError(
"Failed to upload file too many times."
)
try:
file_slice = fileobj.read(chunk_size)
if not file_slice:
break
current_bytes = len(file_slice)
if current_bytes < chunk_size:
end = size
else:
end = start + current_bytes
headers = {
'Content-Range': '%s-%s/%s' % (start, end - 1, size),
'Content-Type': 'application/octet-stream'
}
# Data should always be sent using the ``data`` keyword and not the
# ``json`` keyword. This allows bytes to be sent (such as in the case
# of uploading ISO files.
response = client.api.post(url, headers=headers, data=file_slice)
if response.status != 200:
# When this fails, the output is usually the body of whatever you
# POSTed. This is almost always unreadable because it is a series
# of bytes.
#
# Therefore, we only inform on the returned HTTP error code.
raise F5ModuleError('Error during upload, http error code: {0}'.format(str(response.status)))
start += current_bytes
except F5ModuleError:
# You must seek back to the beginning of the file upon exception.
#
# If this is not done, then you risk uploading a partial file.
fileobj.seek(0)
retries += 1
return True
def tmos_version(client):
uri = "https://{0}:{1}/mgmt/tm/sys/".format(
client.provider['server'],
client.provider['server_port'],
)
resp = client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] in [400, 403]:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
to_parse = urlparse(response['selfLink'])
query = to_parse.query
version = query.split('=')[1]
return version
def bigiq_version(client):
uri = "https://{0}:{1}/mgmt/shared/resolver/device-groups/cm-shared-all-big-iqs/devices".format(
client.provider['server'],
client.provider['server_port'],
)
query = "?$select=version"
resp = client.api.get(uri + query)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] in [400, 403]:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
if 'items' in response:
version = response['items'][0]['version']
return version
raise F5ModuleError(
'Failed to retrieve BIG-IQ version information.'
)
def module_provisioned(client, module_name):
provisioned = modules_provisioned(client)
if module_name in provisioned:
return True
return False
def package_installed(client, package_name):
provisioned = packages_installed(client)
if package_name in provisioned:
return True
return False
def modules_provisioned(client):
"""Returns a list of all provisioned modules
Args:
client: Client connection to the BIG-IP
Returns:
A list of provisioned modules in their short name for.
For example, ['afm', 'asm', 'ltm']
"""
uri = "https://{0}:{1}/mgmt/tm/sys/provision".format(
client.provider['server'],
client.provider['server_port']
)
resp = client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]:
raise F5ModuleError(resp.content)
if 'items' not in response:
return []
return [x['name'] for x in response['items'] if x['level'] != 'none']
def packages_installed(client):
"""Returns a list of installed ATC packages
Args:
client: Client connection to the BIG-IP
Returns:
A list of installed packages in their short name for.
For example, ['as3', 'do', 'ts']
"""
packages = {
"f5-declarative-onboarding": "do",
"f5-appsvcs": "as3",
"f5-appsvcs-templates": "fast",
"f5-cloud-failover": "cfe",
"f5-telemetry": "ts",
"f5-service-discovery": "sd"
}
uri = "https://{0}:{1}/mgmt/shared/iapp/global-installed-packages".format(
client.provider['server'],
client.provider['server_port']
)
resp = client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 404:
return []
if resp.status not in [200, 201] or 'code' in response and response['code'] not in [200, 201]:
raise F5ModuleError(resp.content)
if 'items' not in response:
return []
result = [packages[x['appName']] for x in response['items'] if x['appName'] in packages.keys()]
return result

View File

@@ -0,0 +1,85 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
validate_ip_address, validate_ip_v6_address
)
from ipaddress import ip_interface, ip_network
def is_valid_ip(addr, type='all'):
if type in ['all', 'ipv4']:
if validate_ip_address(addr):
return True
if type in ['all', 'ipv6']:
if validate_ip_v6_address(addr):
return True
return False
def ipv6_netmask_to_cidr(mask):
"""converts an IPv6 netmask to CIDR form
According to the link below, CIDR is the only official way to specify
a subset of IPv6. With that said, the same link provides a way to
loosely convert an netmask to a CIDR.
Arguments:
mask (string): The IPv6 netmask to convert to CIDR
Returns:
int: The CIDR representation of the netmask
References:
https://stackoverflow.com/a/33533007
http://v6decode.com/
"""
bit_masks = [
0, 0x8000, 0xc000, 0xe000, 0xf000, 0xf800,
0xfc00, 0xfe00, 0xff00, 0xff80, 0xffc0,
0xffe0, 0xfff0, 0xfff8, 0xfffc, 0xfffe,
0xffff
]
count = 0
try:
for w in mask.split(':'):
if not w or int(w, 16) == 0:
break
count += bit_masks.index(int(w, 16))
return count
except Exception:
return -1
def is_valid_ip_network(address):
try:
ip_network(u'{0}'.format(address))
return True
except ValueError:
return False
def is_valid_ip_interface(address):
try:
ip_interface(u'{0}'.format(address))
return True
except ValueError:
return False
def get_netmask(address):
addr = ip_network(u'{0}'.format(address))
netmask = addr.netmask.compressed
return netmask
def compress_address(address):
addr = ip_network(u'{0}'.format(address))
result = addr.compressed.split('/', maxsplit=1)[0]
return result

View File

@@ -0,0 +1,165 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import json
import os
import sys
import uuid
import random
import re
import socket
from datetime import datetime
from ssl import SSLError
from time import time
from ansible.module_utils.urls import open_url
from ansible.module_utils.six.moves.urllib.error import (
HTTPError, URLError
)
from .constants import (
TEEM_ENDPOINT, TEEM_KEY, TEEM_TIMEOUT, TEEM_VERIFY, BASE_HEADERS, PLATFORM, CICD_ENV
)
from .version import CURRENT_COLL_VERSION
class TeemClient(object):
def __init__(self, start_time, module, version):
self.module_name = module._name
self.ansible_version = module.ansible_version
self.version = version
self.start_time = start_time
self.docker = False
self.in_ci = False
self.coll_name = 'F5_MODULES'
def prepare_request(self):
self.docker = in_docker()
user_agent = '{0}/{1}'.format(self.coll_name, CURRENT_COLL_VERSION)
dai = generate_asset_id(socket.gethostname())
telemetry = self.build_telemetry()
url = 'https://%s/ee/v1/telemetry' % TEEM_ENDPOINT
headers = {
'F5-ApiKey': TEEM_KEY,
'F5-DigitalAssetId': str(dai),
'F5-TraceId': str(uuid.uuid4()),
'User-Agent': user_agent
}
headers.update(BASE_HEADERS)
data = {
'digitalAssetName': self.coll_name,
'digitalAssetVersion': CURRENT_COLL_VERSION,
'digitalAssetId': str(dai),
'documentType': '{0} Ansible Collection'.format(self.coll_name),
'documentVersion': '1',
'observationStartTime': self.start_time,
'observationEndTime': datetime.now().isoformat(),
'epochTime': time(),
'telemetryId': str(uuid.uuid4()),
'telemetryRecords': telemetry
}
return url, headers, data
def send(self):
url, headers, data = self.prepare_request()
payload = json.dumps(data)
try:
response = open_url(
url=url,
method='POST',
headers=headers,
timeout=TEEM_TIMEOUT,
validate_certs=TEEM_VERIFY,
data=payload
)
# we need to ensure that any connection errors to TEEM do not cause failure of module to run.
except (HTTPError, URLError, SSLError):
return None
ok = re.search(r'20[01-4]', str(response.code))
if ok:
return True
return False
def build_telemetry(self):
platform = self.get_platform()
self.in_ci, ci_name = in_cicd()
python_version = sys.version.split(' ', maxsplit=1)[0]
return [{
'CollectionName': '{0}'.format(self.coll_name),
'CollectionVersion': CURRENT_COLL_VERSION,
'CollectionModuleName': self.module_name,
'f5Platform': platform,
'f5SoftwareVersion': self.version if self.version else 'none',
'ControllerAnsibleVersion': self.ansible_version,
'ControllerPythonVersion': python_version,
'ControllerAsDocker': self.docker,
'DockerHostname': socket.gethostname() if self.docker else 'none',
'RunningInCiEnv': self.in_ci,
'CiEnvName': ci_name if self.in_ci else 'none'
}]
def get_platform(self):
if self.coll_name.lower() in self.module_name:
self.module_name = self.module_name.split('.')[2]
return PLATFORM.get(self.module_name.split('_')[0], 'unknown')
return PLATFORM.get(self.module_name.split('_')[0], 'unknown')
def in_docker():
"""Check to see if we are running in a container
Returns:
bool: True if in a container. False otherwise.
"""
try:
with open('/proc/1/cgroup') as fh:
lines = fh.readlines()
except IOError:
return False
if any('/docker/' in x for x in lines):
return True
return False
def in_cicd():
env = determine_environment()
if env:
return True, env
return False, None
def determine_environment():
for key in CICD_ENV:
env = os.getenv(key)
if env:
if key == 'CI_NAME' and env == 'codeship':
return CICD_ENV[key]
if key == 'CI_NAME' and env != 'codeship':
return None
return CICD_ENV[key]
def generate_asset_id(seed):
rd = random.Random()
rd.seed(seed)
result = uuid.UUID(int=rd.getrandbits(128))
return result
def send_teem(start_time, client, module, version=None):
""" Sends Teem Data if allowed."""
if client.provider['no_f5_teem'] is True:
return False
teem = TeemClient(start_time, module, version)
teem.send()

View File

@@ -0,0 +1,119 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import re
from .common import F5ModuleError
_CLEAN_HEADER_REGEX_BYTE = re.compile(b'^\\S[^\\r\\n]*$|^$')
_CLEAN_HEADER_REGEX_STR = re.compile(r'^\S[^\r\n]*$|^$')
def check_header_validity(header):
"""Verifies that header value is a string which doesn't contain
leading whitespace or return characters.
NOTE: This is a slightly modified version of the original function
taken from the requests library:
http://docs.python-requests.org/en/master/_modules/requests/utils/
:param header: string containing ':'.
"""
try:
name, value = header.split(':')
except ValueError:
raise F5ModuleError('Invalid header format: {0}'.format(header))
if name == '':
raise F5ModuleError('Invalid header format: {0}'.format(header))
if isinstance(value, bytes):
pat = _CLEAN_HEADER_REGEX_BYTE
else:
pat = _CLEAN_HEADER_REGEX_STR
try:
if not pat.match(value):
raise F5ModuleError("Invalid return character or leading space in header: %s" % name)
except TypeError:
raise F5ModuleError("Value for header {%s: %s} must be of type str or "
"bytes, not %s" % (name, value, type(value)))
def build_service_uri(base_uri, partition, name):
"""Build the proper uri for a service resource.
This follows the scheme:
<base_uri>/~<partition>~<<name>.app>~<name>
:param base_uri: str -- base uri of the REST endpoint
:param partition: str -- partition for the service
:param name: str -- name of the service
:returns: str -- uri to access the service
"""
name = name.replace('/', '~')
return '%s~%s~%s.app~%s' % (base_uri, partition, name, name)
def parseStats(entry):
if 'description' in entry:
return entry['description']
elif 'value' in entry:
return entry['value']
elif 'entries' in entry or 'nestedStats' in entry and 'entries' in entry['nestedStats']:
if 'entries' in entry:
entries = entry['entries']
else:
entries = entry['nestedStats']['entries']
result = None
for name in entries:
entry = entries[name]
if 'https://localhost' in name:
name = name.split('/')
name = name[-1]
if result and isinstance(result, list):
result.append(parseStats(entry))
elif result and isinstance(result, dict):
result[name] = parseStats(entry)
else:
try:
int(name)
result = list()
result.append(parseStats(entry))
except ValueError:
result = dict()
result[name] = parseStats(entry)
else:
if '.' in name:
names = name.split('.')
key = names[0]
value = names[1]
if result is None:
# result can be None if this branch is reached first
#
# For example, the mgmt/tm/net/trunk/NAME/stats API
# returns counters.bitsIn before anything else.
result = dict()
result[key] = dict()
elif key not in result:
result[key] = dict()
elif result[key] is None:
result[key] = dict()
result[key][value] = parseStats(entry)
else:
if result and isinstance(result, list):
result.append(parseStats(entry))
elif result and isinstance(result, dict):
result[name] = parseStats(entry)
else:
try:
int(name)
result = list()
result.append(parseStats(entry))
except ValueError:
result = dict()
result[name] = parseStats(entry)
return result

View File

@@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2021, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# This collection version needs to be updated at each release
CURRENT_COLL_VERSION = "1.22.0"

Some files were not shown because too many files have changed in this diff Show More