aruba / aruba-ansible-modules

Aruba Ansible Modules
Apache License 2.0
80 stars 36 forks source link

CPPM : GET request response body not exposed in module result #64

Closed sboudjema closed 4 years ago

sboudjema commented 4 years ago

https://github.com/aruba/aruba-ansible-modules/blob/f494294dc4ff7b947630e83bd3811c2a11e8cb7a/aruba_module_installer/library/modules/network/aruba_clearpass/arubaclearpass_config.py#L165

This result does not allow to use the data sent back in the HTTP repsonse body.

I suggest returning a 'json' attribut in the result, containing the requests response body. THis way, data retrieved from the reauest can be used in further tasks, as in this example:

   - name: Get Current Device List
      arubaclearpass_config:
        method: GET
        api_name: network-device-group/{{ mc_nad_group_id }}
      register: response

    - set_fact:
        nad_group_devices: "{{ response.json.value.split(' ,') }}"
karthikeyan-dhandapani commented 4 years ago

Verified and merged the respective PR. Closing this issue.