Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: dnsproxyrecords supports no state #339

Closed
fa-elepape opened this issue Jan 11, 2024 · 2 comments
Closed

[Bug]: dnsproxyrecords supports no state #339

fa-elepape opened this issue Jan 11, 2024 · 2 comments
Assignees
Labels

Comments

@fa-elepape
Copy link

Summary

When attempting to use netscaler.adc.dnsproxyrecords to flush DNS PROXY records, the module supports no valid state argument.

Issue Type

Bug Report

Component Name

dnsproxyrecords

Python Version

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

Ansible Version

$ ansible --version
ansible [core 2.16.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/share/ansible/lib64/python3.11/site-packages/ansible
  ansible collection location = /etc/ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Sep  7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/local/share/ansible/bin/python3)
  jinja version = 3.1.2
  libyaml = True

Ansible Configuration

$ ansible-config dump --only-changed
ANSIBLE_FORCE_COLOR(/etc/ansible/ansible.cfg) = True
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = jsonfile
CACHE_PLUGIN_CONNECTION(/etc/ansible/ansible.cfg) = cache
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 50
DEFAULT_REMOTE_USER(/etc/ansible/ansible.cfg) = root
DISPLAY_SKIPPED_HOSTS(/etc/ansible/ansible.cfg) = False
INJECT_FACTS_AS_VARS(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = auto_silent
TAGS_SKIP(/etc/ansible/ansible.cfg) = ['powered_off']
USE_PERSISTENT_CONNECTIONS(/etc/ansible/ansible.cfg) = True

netscaler.adc Collection Version

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

Target NetScaler Version

> show ns version
NetScaler NS13.0: Build 90.12.nc, Date: May 15 2023, 03:58:09   (64-bit)

Equivalent NetScaler CLI Command

flush dns proxyRecords

Steps to Reproduce

---
- name: netscaler.adc.dnsproxyrecords bug report
  hosts: localhost
  gather_facts: false

  tasks:
  - netscaler.adc.dnsproxyrecords:

Expected Results

Proxy records should be flushed according to given parameters.

Actual Results

PLAYBOOK: netscaler-bugreport.yml ********************************************************************************
1 plays in netscaler-bugreport.yml

PLAY [netscaler.adc.dnsproxyrecords bug report] ******************************************************************
Using module file /etc/ansible/collections/ansible_collections/netscaler/adc/plugins/modules/dnsproxyrecords.py
Pipelining is enabled.
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: me
<127.0.0.1> EXEC /bin/sh -c '/usr/local/share/ansible/bin/python3 && sleep 0'

TASK [netscaler.adc.dnsproxyrecords] *****************************************************************************
task path: netscaler-bugreport.yml:7
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_path": "nitro/v1/config",
            "negrectype": null,
            "nitro_auth_token": null,
            "nitro_pass": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nitro_protocol": "https",
            "nitro_user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "nsip": "netscaler.example.com",
            "save_config": true,
            "state": "present",
            "type": null,
            "validate_certs": true
        }
    },
    "msg": "value of state must be one of: , got: present"
}

PLAY RECAP *******************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Additioinal Notes

No response

@sumanth-lingappa
Copy link
Collaborator

fixed in the latest 2.3.0 version.

A new state flushed is introduced for flush action.

Refer HERE for an example.

Fix can be found in PR #341

@fa-elepape
Copy link
Author

Well that was fast, thanks! I'll give it a go 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants