Start a Conversation

Solved!

Go to Solution

Closed

Moderator

 • 

6.6K Posts

753

March 28th, 2023 01:00

PowerStore Ansible question

hi there .

I am trying to create vol using ansible playbook . But getting below msg . 

TASK [Create Multiple Volumes in Async Mode] **********************************************
failed: [localhost] (item=1) => {"ansible_loop_var": "item", "changed": false, "item": 1, "msg": "Ansible modules for Powerstore require the PyPowerStore python library to be installed. Please install the library before using these modules."}

Used Yml : https://github.com/dell/ansible-powerstore/blob/main/docs/samples/create_multiple_volumes.yml  

My PyPowerStore python library  is....

$ pip3 list |grep PyPowerStore
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
PyPowerStore (1.9.0.0)

 

Has anbody seen this message?  ( tried search_volumes.yml   and found same message) 

BTW I am using Ansible modules for PowerStore release version 1.8.0

$ ls
dellemc dellemc.powerstore-1.8.0.info

 

Any info would be nice ! 

thanks ! 



1 Rookie

 • 

79 Posts

March 30th, 2023 23:00

Hi @ayas ,

From the output of ansible --version command, the configured collection path is  

 /root/.ansible/collections:/usr/share/ansible/collections

Is this where the collections are installed or the ansible_collections_path need to be set as below

export ANSIBLE_COLLECTIONS_PATHS=/home/ayasaito

Thanks,

Jennifer.

1 Rookie

 • 

79 Posts

March 30th, 2023 05:00

Hi @ayas 

Could you please share the output of ansible --version command, to view the python version?

Thanks,

Jennifer

Moderator

 • 

6.6K Posts

March 30th, 2023 20:00

hi Jennifer_john 

thanks for the reply ...

 

this is the version > 

[root@auvcetillem1m1 samples]# ansible --version

ansible [core 2.13.3]

  config file = /etc/ansible/ansible.cfg

  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']

  ansible python module location = /usr/lib/python3.9/site-packages/ansible

  ansible collection location = /home/ayasaito/ansible_collections/dellemc/powerstore/docs/samples:/home/ayasaito

  executable location = /usr/bin/ansible

  python version = 3.9.13 (main, Nov 16 2022, 10:51:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]

  jinja versio

 

1 Rookie

 • 

79 Posts

March 30th, 2023 22:00

Hi @ayas ,

The ansible installation is pointing to python3.9 version, could you please try to install PyPowerStore using

pip3.9 install PyPowerStore 

and try again?

 

Thanks,

Jennifer

Moderator

 • 

6.6K Posts

March 30th, 2023 22:00

hi Jennifer_john  

I have tried as per your advise .. 

[root@auvcetillem1m1 ayasaito]# pip3.9 install

 

PyPowerStore

WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.9 install --user` instead.

Collecting PyPowerStore

  Downloading PyPowerStore-1.10.0.0-py3-none-any.whl (47 kB)

     |████████████████████████████████| 47 kB 214 kB/s

Collecting requests>=2.23.0

  Downloading requests-2.28.2-py3-none-any.whl (62 kB)

     |████████████████████████████████| 62 kB 841 kB/s

Collecting urllib3>=1.26.7

  Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)

Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.9/site-packages (from requests>=2.23.0->PyPowerStore) (2.10)

Collecting certifi>=2017.4.17

  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)

Collecting charset-normalizer<4,>=2

  Downloading charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)

     |████████████████████████████████| 199 kB 1.5 MB/s

Installing collected packages: certifi, charset-normalizer, urllib3, requests, PyPowerStore

Successfully installed PyPowerStore-1.10.0.0 certifi-2022.12.7 charset-normalizer-3.1.0 requests-2.28.2 urllib3-1.26.15

 

 

[root@auvcetillem1m1 ayasaito]# ansible --version

ansible [core 2.13.3]

  config file = /etc/ansible/ansible.cfg

  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']

  ansible python module location = /usr/lib/python3.9/site-packages/ansible

  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections

  executable location = /usr/bin/ansible

  python version = 3.9.13 (main, Nov 16 2022, 10:51:39) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]

  jinja version = 3.1.2

  libyaml = True

 

 

And run playbook and now has got different error . 

ERROR! couldn't resolve module/action 'volume'. This often indicates a misspelling, missing collection, or incorrect module path. 

Moderator

 • 

6.6K Posts

March 31st, 2023 01:00

hi Jennifer_john   

Thank you for your advises ! Finally I was able to create vols !

PLAY [Creation of Multiple Volume] **************************************************

TASK [Gathering Facts] **************************************************************
ok: [localhost]

TASK [Create multiple volumes] ******************************************************
changed: [localhost] => (item=1)
changed: [localhost] => (item=2)
changed: [localhost] => (item=3)

PLAY RECAP **************************************************************************
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

 

thanks heaps  for your help ! 

export Paths was my mistake this time ... 

 

1 Rookie

 • 

79 Posts

April 5th, 2023 03:00

Hi @ayas , Thanks for the confirmation!

No Events found!

Top