ansible-collection-netscaleradc icon indicating copy to clipboard operation
ansible-collection-netscaleradc copied to clipboard

[Bug]: When i utilize netscaler.adc.nspartition, i am facing issue with this module.

Open mayur189 opened this issue 1 year ago • 0 comments

Summary

I want to switch to default partition using state: switched but it will not going to netscaler default or any other partition. it is showing just single partition name in which netscaler was present. Also module is not listdown the partitions. can you help on this or suggest anything i am missing. I am using ansible version:2.13.13 and netscaler.adc: 2.6.1

Issue Type

Bug Report

Component Name

nspartition, sslcertkey, sslcert

Python Version

$ python --version # or python3 --version
python version using 3.6.8
python3 version using 3.8.12

Ansible Version

$ ansible --version

2.13.13

Ansible Configuration

$ ansible-config dump --only-changed

netscaler.adc Collection Version

$ ansible-galaxy collection list netscaler.adc
netscaler.adc: 2.6.1

Target NetScaler Version

> show ns version
14.1-25.56

Equivalent NetScaler CLI Command


Steps to Reproduce

---
- name: Partition details and ssl certkey in the partition
  hosts: localhost
  connection: ansible.netcommon.network_cli
  gather_facts: false
  collections:
    - netscaler.adc
  vars:
    netscaler: " enter ipaddress"
    netscaler_pass: "enter password"
  tasks:
    - name: List the partition and details
      block:
      - name: Login to netscale adc
        netscaler.adc.login:
          nsip: "{{ netscaler }}"
          username: "enter username"
          password: "{{ netscaler_pass }}"
          validate_certs: false
        register: login_result
 
      - name: Display the login result information to retrieve session id
        ansible.builtin.debug:
          var: login_result
 
      - name: Get the netscaler partition list
        netscaler.adc.nspartition:
          nsip: "{{ netscaler }}"
          nitro_auth_token: "{{ login_result.sessionid }}"
          partitionname: default
          state: switched
          validate_certs: false
        register: partition_list
 
      - name: Display the netscaler partion list
        ansible.builtin.debug:
          var: partition_list
 
      - name: get ns partition using command
        ansible.builtin.command: "ssh username@ipaddress 'show partition default'"
        register: cmd_result
 
      - name: Display the show ns command result
        debug:
          var: cmd_result

Expected Results

I expected to fetch default partition and list all the partition under it. looping through each partition to fetch the sslcertificate and sslcertificatekey list and details to configure the csr and sslcertificate for expiring certificates.

Actual Results


Additional Notes

No response

mayur189 avatar Sep 03 '24 14:09 mayur189