dell / ansible-datadomain

Ansible collection for DataDomain
GNU General Public License v3.0
5 stars 1 forks source link

Collection doesnt work as expected #3

Closed smnmtzgr closed 1 year ago

smnmtzgr commented 1 year ago

Hi, I've followed the README and configured ansible like you proposed to. But it looks like the ansible modules try to execute the python code on the data-domain instead of locally on my host. I get errors like this: File \"/var/folders/80/b827sgdd21q5nf207_xdcw3r0000gp/T/ansible_dellemc.datadomain.cifs_payload_c58w6ioc/ansible_dellemc.datadomain.cifs_payload.zip/ansible_collections/dellemc/datadomain/plugins/module_utils/dd_connect.py\", line 5, in <module>\nModuleNotFoundError: No module named 'urllib3

Locally everything is installed, including urllib3.

I've configured my inventory like this:

[dd]
<data_domain_ip>

[dd:vars]
ansible_port = 22
ansible_user = testuser
private_key_file = /root/.ssh/id_rsa

Any my playbook:

- name: Data Domain Playbook.
  hosts: dd
  connection: local
  gather_facts: false
  vars_files:
    - vars/shares.yml

  tasks:
    - name: enable CIFS
      dellemc.datadomain.cifs:
          state: enable

    - name: Get CIFS status
      dellemc.datadomain.cifs:
          state: status