F5Networks / f5-ansible

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

missing server technologies in the asm module #2365

Open Ysiakowy opened 10 months ago

Ysiakowy commented 10 months ago
COMPONENT NAME

f5networks.f5_modules.bigip_asm_policy_server_technology

Environment

ANSIBLE VERSION
ansible [core 2.15.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/lab/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/lab/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
BIGIP VERSION
Sys::Version
Main Package
  Product     BIG-IP
  Version     16.1.3.4
  Build       0.0.2
  Edition     Point Release 4
  Date        Mon Mar 20 14:38:17 PDT 202
CONFIGURATION
OS / ENVIRONMENT

N/A

SUMMARY

When using the Ansible module, it is not possible to add all available server technologies to the ASM policy There is only 40 of 75 server technology available in the module. The following server technologies are available to choose from on F5

  - "AngularJS"
  - "Apache Struts" 
  - "Apache Tomcat" 
  - "Apache/NCSA HTTP Server"
  - "ASP"
  - "ASP.NET"
  - "Backbone.js"
  - "BEA Systems WebLogic Server"
  - "CGI"
  - "Cisco"
  - "Citrix"
  - "CodeIgniter"
  - "CouchDB"
  - "Django"
  - "ef.js"
  - "Elasticsearch"
  - "Ember.js"
  - "Express.js"
  - "Front Page Server Extensions (FPSE"
  - "Google Web Toolkit"
  - "GraphQL"
  - "Handlebars"
  - "IBM DB2"
  - "IIS"
  - "Java Servlets/JSP"
  - "JavaScript"
  - "JavaServer Faces (JSF)"
  - "JBoss"
  - "Jenkins"
  - "Jetty"
  - "Joomla"
  - "jQuery"
  - "Laravel"
  - "Lotus Domino"
  - "Macromedia ColdFusion"
  - "Macromedia JRun"
  - "Microsoft SQL Server"
  - "Microsoft Windows"
  - "MongoDB"
  - "MooTools"
  - "Mustache"
  - "MySQL"
  - "Neo4J"
  - "Ngnix"
  - "Node.js"
  - "Novell"
  - "Oracle"
  - "Oracle Application Server"
  - "Oracle Identity Manager"
  - "Outlook Web Access"
  - "PHP"
  - "PostgreSQL"
  - "Prototype"
  - "Proxy Servers"
  - "Python"
  - "React"
  - "Redis"
  - "RequireJS"
  - "Ruby"
  - "SharePoint"
  - "Spring Boot"
  - "SQLite"
  - "SSI (Server Side Includes)"
  - "Svelte"
  - "Sybase/ASE"
  - "TYPO3 CMS"
  - "Ulkit"
  - "Underscore.js"
  - "Unix/Linux"
  - "Vue.js"
  - "WebDAV"
  - "WordPress"
  - "XML"
  - "Zend"
  - "ZURB Foundation"
STEPS TO REPRODUCE
- name: Add Server Technology
  bigip_asm_policy_server_technology:
    provider:
      validate_certs: false
      server: "{{ f5_host }}"
      user: "{{ f5_user }}"
      password: "{{ f5_pass }}"   
    name: "{{ item }}"
    policy_name: "{{ f5_asm_policy_name}}"
  with_items: "SQLite"
EXPECTED RESULTS

adding SQLite technology to the ASM policy

ACTUAL RESULTS
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "name": "SQLite",
            "partition": "Common",
            "policy_name": "TEMPATE-API-POLICY_ASM_v2.2_ASM",
            "provider": {
                "auth_provider": null,
                "no_f5_teem": null,
                "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "server": "f5-big-ip01.ysiak.lab",
                "server_port": null,
                "timeout": null,
                "transport": "rest",
                "user": "admin",
                "validate_certs": null
            },
            "state": "present"
        }
    },
    "msg": "value of name must be one of: jQuery, Java Servlets/JSP, ASP, WebDAV, IIS, Front Page Server Extensions (FPSE), ASP.NET, Microsoft Windows, Unix/Linux, Macromedia ColdFusion, WordPress, Apache Tomcat, Apache/NCSA HTTP Server, Outlook Web Access, PHP, Microsoft SQL Server, Oracle, MySQL, Lotus Domino, BEA Systems WebLogic Server, Macromedia JRun, Novell, Cisco, SSI (Server Side Includes), Proxy Servers, CGI, Sybase/ASE, IBM DB2, PostgreSQL, XML, Apache Struts, Elasticsearch, JBoss, Citrix, Node.js, Django, MongoDB, Ruby, JavaServer Faces (JSF), Joomla, Jetty, got: SQLite"
}
pgouband commented 10 months ago

Hi @Ysiakowy,

Thanks for the feedback. Unfortunately we will not add it in imperative collection but we will add it in declarative collection (https://github.com/F5Networks/f5-ansible-bigip) on bigip_awaf_policy module: https://clouddocs.f5.com/products/orchestration/ansible/devel/f5_bigip/modules_2_0/bigip_awaf_policy_module.html#bigip-awaf-policy-module-2