rubrik-modules-for-ansible
rubrik-modules-for-ansible copied to clipboard
Adding a host using 'rubrik_physical_host_action' does not allow for Oracle discovery
Expected Behavior
Adding a host using 'rubrik_physical_host_action' does not allow for Oracle discovery (if used against Rubrik CDM 5.2)
Current Behavior
Currently, 'rubrik_physical_host_action' does not take parameter whether to discover Oracle and what the username of Oracle user should be. When adding a Linux / Unix host this way, the host is added but Oracle discovery is not selected for the host in Rubrik CDM 5.2.
Failure Information (for bugs)
None
- Use verbose outputs to capture any debug information.
[root@oracle-12201-vagrant rubrik-modules-for-ansible]# cat add_host.yml
- hosts: localhost
connection: local
gather_facts: false
vars:
credentials:
node_ip: 192.168.75.180
username: admin
password: CarsDontFly
tasks:
- rubrik_physical_host:
node_ip: 192.168.75.180
username: admin
password: CarsDontFly
hostname: 192.168.200.85
action: "{{ rubrik_physical_host_action | default('add') }}"
[root@oracle-12201-vagrant rubrik-modules-for-ansible]# ansible-playbook add_host.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
PLAY [localhost] *********************************************************************************************************************************************************************************************************************************************************************************************************
TASK [rubrik_physical_host] **********************************************************************************************************************************************************************************************************************************************************************************************
changed: [localhost]
PLAY RECAP ***************************************************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Steps to Reproduce
(1) Have Rubrik CDM 5.2 cluster or EDGE. (2) Run rubrik_physical_host for a host which has Oracle on it. (3) The host is added but Oracle discovery is not enabled.
Context
The issue seems to be that ansible uses this API:
api_request = rubrik.add_physical_host(ansible["hostname"], ansible["timeout"])
That calls our Python SDK (physical.py) which contains:
return self.post('internal', '/host/bulk', config, timeout)
However, in Rubrik CDM 5.2, you need to provide two additional pieces of information for Oracle discovery in the bulk API:
[{"hostname":"192.168.200.85","hasAgent":true,"isOracleHost":true,"oracleSysDbaUser":"oracle"}]
"isOracleHost" and "oracleSysDbaUser" are not currently included in the Ansible or SDK options.
- Version of project: v1.0.6
- Version of Rubrik CDM: 5.2.0
- Version of operating system: Oracle Linux Server 7.6