ansible-collections/cisco.ios

cisco.ios.ios_service not working as intended.

jorgenspange opened this issue · 0 comments

SUMMARY

The cisco.ios.ios_service module is not applying configuration as intended.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_service

ANSIBLE VERSION
ansible [core 2.16.6]
  config file = /Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg
  configured module search path = ['/Users/jorgenspange/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/9.5.1/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/jorgenspange/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.3 (main, Apr  9 2024, 08:09:14) [Clang 15.0.0 (clang-1500.3.9.4)] (/opt/homebrew/Cellar/ansible/9.5.1/libexec/bin/python)
  jinja version = 3.1.3
  libyaml = True

COLLECTION VERSION
cisco.ios                                8.0.0
CONFIGURATION
ANSIBLE_COW_PATH(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = /opt/homebrew/bin/cowsay
ANSIBLE_COW_SELECTION(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = small
ANSIBLE_NOCOWS(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = False
ANSIBLE_PIPELINING(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = True
CONFIG_FILE() = /Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg
DEFAULT_FORKS(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = 10
DEFAULT_GATHERING(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = smart
DEFAULT_HOST_LIST(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = ['/Users/jorgenspange/Documents/git/ansible-adhoc-automation/inventor>
DEFAULT_ROLES_PATH(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = ['/Users/jorgenspange/Documents/git/ansible-adhoc-automation/roles']
DEFAULT_STDOUT_CALLBACK(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = yaml
DEFAULT_TIMEOUT(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = 60
DEFAULT_VAULT_PASSWORD_FILE(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = /Users/jorgenspange/Documents/git/ansible-adhoc-automation/>
DISPLAY_SKIPPED_HOSTS(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = False
HOST_KEY_CHECKING(/Users/jorgenspange/Documents/git/ansible-adhoc-automation/ansible.cfg) = False
OS / ENVIRONMENT

MacBook Pro 2021 M1 - Sonoma 14.4.1

STEPS TO REPRODUCE
   - name: apply config
      cisco.ios.ios_service:
        config:
          tcp_keepalives_in: true
          tcp_keepalives_out: true
          timestamps:
            - msg: log
              enable: true
              timestamp: datetime
              datetime_options:
                localtime: true
                msec: true
            - msg: debug
              enable: true
              timestamp: datetime
              datetime_options:
                localtime: true
                msec: true
          password_encryption: true
          pad: false
          config: false
          tcp_small_servers:
            enable: false
          udp_small_servers:
            enable: false
          call_home: true
          private_config_encryption: false
        state: overridden

Makes this configuration on the switch:

service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec
no service timestamps log
service password-encryption
no service private-config-encryption
service call-home
 service-policy input system-cpp-policy

When running with rendered it makes no sense either:

  rendered:
  - service call-home
  - service counters max age 0
  - service dhcp
  - service password-encryption
  - service password-recovery
  - service prompt config
  - service slave-log
  - service tcp-keepalives-in
  - service tcp-keepalives-out

Ran towards Cisco Catalyst 9400 running IOS-XE 17.09.05 and Cisco Catalyst 3850 running IOS-XE 16.12.11.