community.general.ssh_config: ModuleNotFoundError: No module named 'storm'

198 views
Skip to first unread message

Amedee Van Gasse

unread,
Apr 16, 2021, 8:42:30 AM4/16/21
to Ansible Project
I'm doing this:

- name: Add Bitbucket in the SSH configuration
  community.general.ssh_config:
    user: "{{ jenkins_user }}"
    host: bitbucket
    remote_user: git
    hostname: "{{ bitbucket_hostname }}"
    port: '7999'
    identity_file: "/home/{{ jenkins_user }}/.ssh/{{ ssh_private_key }}"
    state: present

I get this error:

    amazon-ebs: TASK [Add Bitbucket in the SSH configuration] **********************************
    amazon-ebs: Friday 16 April 2021  14:35:03 +0200 (0:00:00.599)       0:17:50.265 **********
    amazon-ebs: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'storm'
    amazon-ebs: fatal: [default]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (stormssh) on ip-172-31-4-198's Python /usr/bin/python3. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}

I already did

pip install storm

Abhijeet Kasurde

unread,
Apr 16, 2021, 9:23:55 AM4/16/21
to ansible...@googlegroups.com
Can you please check if Python used by Ansible is same as pip environment?

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/be21c222-0f3d-4335-8486-51d04f2a6afdn%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde

Komal Suthar

unread,
Apr 17, 2021, 12:46:08 AM4/17/21
to ansible...@googlegroups.com
As you are having python version 3 so try to install using pip3 install storm.
Well the error says that u are using storm as a module but in ansible there's no such.

Abhijeet Kasurde

unread,
Apr 17, 2021, 12:55:36 AM4/17/21
to ansible...@googlegroups.com
Btw, the package name is "stormssh" not "storm"

Storm - Storm is an Object Relational Mapper for Python developed at Canonical.
Stormssh - Management commands to ssh config files.





--
Thanks,
Abhijeet Kasurde

Amedee Van Gasse

unread,
Apr 18, 2021, 6:41:23 AM4/18/21
to ansible...@googlegroups.com
Also asked on Stack Overflow and the answer there came on Friday afternoon.


The answer is:
Do pip install stormssh on the remote machine just before doing the ssh config.

However for some reason the ssh config file was never written so in the end I gave up and I just hard linked my key file to id_rsa, which is one of the default filenames that ssh will automatically try

You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/77AQuF44_ww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFwWkHp3-ZrWryCMa5H7HYgoLhFis1Gom3XU9LWg0LJFXLk_3A%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages