StackStorm-Exchange / stackstorm-ansible

st2 content pack containing ansible integrations
https://exchange.stackstorm.org/
Apache License 2.0
36 stars 28 forks source link

Getting error while installing Ansible pack on StackStorm Version st2 3.4.1, on Python 3.6.9 #51

Closed Bindu-yadav8 closed 1 year ago

Bindu-yadav8 commented 1 year ago

Hello,

I want to install ansible pack on stackstorm, but while installing seeing the below error. I have StackStorm running in the Azure VM.

root@CNAS-STACKSTORM:/opt/stackstorm/packs# st2 pack install ansible

For the "ansible" pack, the following content will be registered:

actions | 8 rules | 0 sensors | 0 aliases | 0 triggers | 0

Installation may take a while for packs with many items.

[ succeeded ] init_task
[ succeeded ] download_pack
[ succeeded ] make_a_prerun
[ succeeded ] get_pack_dependencies
[ succeeded ] check_dependency_and_conflict_list
[  failed   ] install_pack_requirements

id: 63b51a225a69f8aa31eec630 action.ref: packs.install parameters: packs:

ansible status: failed start_timestamp: Wed, 04 Jan 2023 06:18:10 UTC end_timestamp: Wed, 04 Jan 2023 06:18:35 UTC result: errors:

message: Execution failed. See result for details. result: exit_code: 1 result: None stderr: "st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Setting up virtualenv for pack "ansible" (/opt/stackstorm/packs/ansible) st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Removing virtualenv in "/opt/stackstorm/virtualenvs/ansible" st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Virtualenv successfull removed. st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv for pack "ansible" in "/opt/stackstorm/virtualenvs/ansible" st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Creating virtualenv in "/opt/stackstorm/virtualenvs/ansible" using Python binary "/opt/stackstorm/st2/bin/python" st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Running command "/opt/stackstorm/st2/bin/virtualenv -p /opt/stackstorm/st2/bin/python --always-copy --verbose --no-download /opt/stackstorm/virtualenvs/ansible" to create virtualenv. st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing base requirements st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing requirement six>=1.9.0,<2.0 with command /opt/stackstorm/virtualenvs/ansible/bin/pip install six>=1.9.0,<2.0. st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing pack specific requirements from "/opt/stackstorm/packs/ansible/requirements.txt" st2.actions.python.SetupVirtualEnvironmentAction: DEBUG Installing requirements from file /opt/stackstorm/packs/ansible/requirements.txt with command /opt/stackstorm/virtualenvs/ansible/bin/pip install -U -r /opt/stackstorm/packs/ansible/requirements.txt. Traceback (most recent call last): File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 334, in obj.run() File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 193, in run output = action.run(**self._parameters) File "/opt/stackstorm/packs/packs/actions/pack_mgmt/setup_virtualenv.py", line 89, in run no_download=no_download) File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/util/virtualenvs.py", line 112, in setup_pack_virtualenv logger=logger) File "/opt/stackstorm/st2/lib/python3.6/site-packages/st2common/util/virtualenvs.py", line 252, in install_requirements (requirements_file_path, stdout, stderr)) Exception: Failed to install requirements from "/opt/stackstorm/packs/ansible/requirements.txt": Collecting ansible>=1.9 (from -r /opt/stackstorm/packs/ansible/requirements.txt (line 1)) Collecting pywinrm[credssp,kerberos]>=0.2.2 (from -r /opt/stackstorm/packs/ansible/requirements.txt (line 2))

=============================DEBUG ASSISTANCE============================= If you are seeing a compilation error please try the following steps to successfully install cryptography: 1) Upgrade to the latest pip and try again. This will fix errors for most users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip 2) Read https://cryptography.io/en/latest/installation/ for specific instructions for your platform. 3) Check our frequently asked questions for more information: https://cryptography.io/en/latest/faq/ 4) Ensure you have a recent Rust toolchain installed: https://cryptography.io/en/latest/installation/#rust

Python: 3.6.9 platform: Linux-5.4.0-1095-azure-x86_64-with-Ubuntu-18.04-bionic pip: n/a setuptools: 59.6.0 setuptools_rust: 1.1.2 rustc: n/a =============================DEBUG ASSISTANCE=============================

image

Can someone please help me to fix this issue?

Bindu-yadav8 commented 1 year ago

@armab Could you please help here?

Bindu-yadav8 commented 1 year ago

Hello,

Can someone please help me with pointers to fix this issue?

Thanks

frank3427 commented 1 year ago

I was able to fix mine by runniing the following on my ubuntu 20.04 sudo apt-get install gcc libkrb5-dev

then reran st2 pack install ansible

arm4b commented 1 year ago

Thanks for the confirmation. Closing, as these are exact instructions that Ansible pack has in Readme requirements here: https://github.com/StackStorm-Exchange/stackstorm-ansible#requirements