ansible-collections / cisco.ios

Ansible Network Collection for Cisco IOS
GNU General Public License v3.0
293 stars 171 forks source link

msec typo in ios_service module #1102

Closed jdetwiler16 closed 3 months ago

jdetwiler16 commented 3 months ago
SUMMARY

There seems to be a typo in the code for the ios_service module where the keyword "msec" is mistyped as "mesc". This happens for both the debug and log timestamps parameters. This worked fine on older versions of the module with Python 3.9.10 and Ansible 8.4.0.

ISSUE TYPE
COMPONENT NAME

cisco.ios.ios_service

ANSIBLE VERSION
ansible [core 2.16.8]
  config file = /home/<service_acct>/_work/3/s/ansible/ansible.cfg
  configured module search path = ['/home/<service_acct>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/<service_acct>/_work/3/s/ansible/1721932356/lib64/python3.11/site-packages/ansible
  ansible collection location = /home/<service_acct>/.ansible/collections/ansible_collections
  executable location = /home/<service_acct>/_work/3/s/ansible/1721932356/bin/ansible
  python version = 3.11.7 (main, May 16 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)] (/home/<service_acct>/_work/3/s/ansible/1721932356/bin/python)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
# /home/<service_acct>/.ansible/collections/ansible_collections
Collection                               Version
---------------------------------------- -------
ansible.netcommon                        7.0.0  
ansible.utils                            5.0.0  
cisco.asa                                6.0.0  
cisco.ios                                9.0.0  
cisco.nxos                               9.0.0  
CONFIGURATION
CONFIG_FILE() = /etc/ansible/ansible.cfg
OS / ENVIRONMENT

Cisco 2960X on IOS 15.2(7)E6 Cisco 9200 on IOS XE 17.09.03

STEPS TO REPRODUCE
      cisco.ios.ios_service:
        config:
          timestamps:
            - msg: debug
              enable: true
              timestamp: datetime
              datetime_options:
                localtime: true
                show_timezone: true
                msec: true
            - msg: log
              enable: true
              timestamp: datetime
              datetime_options:
                localtime: true
                show_timezone: true
                msec: true
EXPECTED RESULTS

service timestamps debug datetime msec localtime show-timezone service timestamps log datetime msec localtime show-timezone

ACTUAL RESULTS
fatal: [host]: FAILED! => changed=false 
  module_stderr: |-
    service timestamps debug datetime mesc localtime show-timezone
    service timestamps debug datetime mesc localtime show-timezone
                                       ^
    % Invalid input detected at '^' marker.
    HOST(config)#

fatal: [host]: FAILED! => changed=false 
  module_stderr: |-
    service timestamps log datetime mesc localtime show-timezone
    service timestamps log datetime mesc localtime show-timezone
                                     ^
    % Invalid input detected at '^' marker.

    HOST(config)#
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
alehaa commented 3 months ago

I've already filed PR #1101 to fix this.

roverflow commented 3 months ago

Will be closing this Issue as the PR to fix it has been merged