junipernetworks.junos icon indicating copy to clipboard operation
junipernetworks.junos copied to clipboard

junos_ntp_global errantly converting routing_instances to routing-instances and then erroring

Open easpeagle opened this issue 10 months ago • 0 comments

SUMMARY

junos_ntp_global module throwing errors when trying to do a basic configuration.

"Unsupported parameters for (basic.py) module: config.servers.routing-instance. Supported parameters include: key_id, prefer, routing_instance, server, version."

We can see in the invocation that it's listing both routing-instance and routing_instance ... the former gets the value we're wanting the latter to get but instead shows null

    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "config": {
                "authentication_keys": null,
                "boot_server": null,
                "broadcast_client": null,
                "broadcasts": null,
                "interval_range": null,
                "multicast_client": null,
                "peers": null,
                "servers": [
                    {
                        "key_id": null,
                        "prefer": null,
                        "routing-instance": "<nope>",
                        "routing_instance": null,
                        "server": "<nope>",
                        "version": 4
                    }
                ],
                "source_addresses": null,
                "threshold": null,
                "trusted_keys": null
            },
            "running_config": null,
            "state": "merged"
        }
    },
    "item": {
        "prefer": true,
        "routing_instance": "<nope>",
        "server": "<nope>"
    },

I've no idea why it's doing this...

ISSUE TYPE
  • Bug Report
COMPONENT NAME
junipernetworks.junos.junos_ntp_global
ANSIBLE VERSION
ansible [core 2.16.0]
  config file = <nope>
  configured module search path = ['<nope> # Not Using']
  ansible python module location = <nope>
  ansible collection location = <nope>
  executable location = <nope>
  python version = 3.11.6 (main, Oct  8 2023, 05:06:43) [GCC 13.2.0] (<nope>)
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
Collection            Version
--------------------- -------
junipernetworks.junos 7.0.0  
CONFIGURATION
CACHE_PLUGIN_CONNECTION(<nope>/ansible.cfg) = $PWD/
COLLECTIONS_PATHS(<nope>/ansible.cfg) = ['<nope>']
CONFIG_FILE() = <nope>/ansible.cfg
DEFAULT_CALLBACK_PLUGIN_PATH(<nope>/ansible.cfg) = ['<nope>/plays/_lib/callbacks # Not >
DEFAULT_HOST_LIST(<nope>/ansible.cfg) = ['<nope>/inventory']
DEFAULT_LOOKUP_PLUGIN_PATH(<nope>/ansible.cfg) = ['<nope>/plays/_lib/lookup_plugins # N>
DEFAULT_MODULE_PATH(<nope>/ansible.cfg) = ['<nope>/plays/_lib/modules # Not Using']
DEFAULT_PRIVATE_KEY_FILE(<nope>/ansible.cfg) = <nope>/files/keys/bigfix.key
DEFAULT_REMOTE_USER(<nope>/ansible.cfg) = ansible
DEFAULT_ROLES_PATH(<nope>/ansible.cfg) = ['<nope>/roles', '<nope>
DEFAULT_TIMEOUT(<nope>/ansible.cfg) = 300
DISPLAY_SKIPPED_HOSTS(<nope>/ansible.cfg) = False
EDITOR(env: EDITOR) = vi
HOST_KEY_CHECKING(<nope>/ansible.cfg) = False
INVENTORY_CACHE_PLUGIN(<nope>/ansible.cfg) = jsonfile
PERSISTENT_COMMAND_TIMEOUT(<nope>/ansible.cfg) = 300
PERSISTENT_CONNECT_TIMEOUT(<nope>/ansible.cfg) = 300
RETRY_FILES_ENABLED(<nope>/ansible.cfg) = False
OS / ENVIRONMENT
STEPS TO REPRODUCE
    - name: configure ntp servers
      junipernetworks.junos.junos_ntp_global:
        config:
          servers:
            - server: "{{ item.server }}"
              routing_instance: "{{ item.routing_instance }}"
              prefer: "{{ item.prefer | bool }}"
      loop: "{{ ntp.servers }}"
      tags:
        - ntp
EXPECTED RESULTS

I expect it to not throw an error and properly configure the device.

ACTUAL RESULTS

An error is thrown.

"msg": "Unsupported parameters for (basic.py) module: config.servers.routing-instance. Supported parameters include: key_id, prefer, routing_instance, server, version."

easpeagle avatar Apr 11 '24 19:04 easpeagle