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]: Systemuser "unset" not working #400

Closed
krausi24 opened this issue Apr 5, 2024 · 1 comment · Fixed by #413
Closed

[Bug]: Systemuser "unset" not working #400

krausi24 opened this issue Apr 5, 2024 · 1 comment · Fixed by #413
Assignees
Labels

Comments

@krausi24
Copy link

krausi24 commented Apr 5, 2024

Summary

Setting the state to "unset" results in error:
fatal: [dkr_adc4 -> localhost]: FAILED! => {"changed": false, "msg": "value of state must be one of: absent, present, got: unset"}

According documentation it should be possible:
image

Issue Type

Bug Report

Component Name

netscaler.adc.systemuser

Python Version

Python 3.10.6

Ansible Version

ansible [core 2.14.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/dkr/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/dkr/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

Ansible Configuration

$ ansible-config dump --only-changed

netscaler.adc Collection Version

Collection    Version
------------- -------
netscaler.adc 2.0.1  

Target NetScaler Version

14.1 17.38

Equivalent NetScaler CLI Command

Steps to Reproduce

- name:
  tags: SYSTEMUSER_edit 
  delegate_to: localhost
  netscaler.adc.systemuser:
    nsip: "{{ ansible_host }}"
    nitro_user: "{{ nitro_user }}"
    nitro_pass: "{{ nitro_pass }}"
    validate_certs: "{{ validate_certs }}"
    state: "unset"
    
    username: "{{ item['SYSTEMUSER_username'] }}"
    externalauth: "{{ item['SYSTEMUSER_externalauth'] }}"

Expected Results

Unset is working

Actual Results

Additional Notes

No response

@sumanth-lingappa
Copy link
Collaborator

sumanth-lingappa commented Apr 15, 2024

@krausi24, the unset state is added in 2.4.0

However, while reproducing this, I found another issue as below for the systemuser module

fatal: [localhost]: FAILED! => {"changed": false, "msg": "argument 'timeout' is of type <class 'str'> and we were unable to convert to float: <class 'str'> cannot be converted to a float"}

The task I tried was

  - name: Reset the user
    delegate_to: localhost
    netscaler.adc.systemuser:
      state: unset

      username: testuser
      timeout: "true"

I will keep updating this issue

@sumanth-lingappa sumanth-lingappa linked a pull request Apr 15, 2024 that will close this issue
sumanth-lingappa added a commit that referenced this issue Apr 17, 2024
…orking

Fixed #400 - unset not working for systemuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants