netscaler/ansible-collection-netscaleradc

[Bug]: "ERROR: Primary key `serverip` is missing for the resource `ntpserver`"

gjonn opened this issue · 1 comments

Summary

When trying to create a ntpserver using only the hostname I get the error:

ERROR: Primary key serverip is missing for the resource ntpserver

But then if you provide it:
'errorcode': 1092, 'message': 'Arguments cannot both be specified [serverName, serverIP]', 'severity': 'ERROR'

Issue Type

Bug Report

Component Name

netscaler.adc.ntpserver

Python Version

$ python --version # or python3 --version
Python 3.10.12

Ansible Version

$ ansible --version
ansible [core 2.15.5]

Ansible Configuration

$ ansible-config dump --only-changed

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
netscaler.adc 2.1.0

Target NetScaler Version

> show ns version

Equivalent NetScaler CLI Command

Steps to Reproduce

- name: NTP Configuration
  delegate_to: localhost
  netscaler.adc.ntpserver:
    nsip: "{{ inventory_hostname }}"
    servername: 'pool.ntp.org'
    preferredntpserver: "YES"
    state: present

Expected Results

Add an NTP server by dns hostname only

Actual Results

Additioinal Notes

No response

This is fixed as part of pull request #338

You can wait for the next release, or, download the latest unreleased ansible collection via below command

ansible-galaxy collection install "git+https://github.com/netscaler/ansible-collection-netscaleradc.git" --force

Refer: https://github.com/netscaler/ansible-collection-netscaleradc/blob/main/README.md#via-github-to-have-the-latest-updated-which-are-yet-to-be-released-in-ansible-galaxy