Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible module not found #1747

Closed
RyanInsolencee opened this issue Jan 24, 2025 · 2 comments
Closed

Ansible module not found #1747

RyanInsolencee opened this issue Jan 24, 2025 · 2 comments
Assignees

Comments

@RyanInsolencee
Copy link

Successfully raise an issue

Before you post your issue make sure it has not been answered yet and provide ⚠️ BASIC SUPPORT INFORMATION (as requested below) if you come to the conclusion it is a new issue.

⚠️ Basic support information (commands are expected to run as root)

We happily take the time to improve T-Pot and take care of things, but we need you to take the time to create an issue that provides us with all the information we need.

  • What OS are you T-Pot running on? ubuntu
  • What is the version of the OS lsb_release -a and uname -a? 24.04
  • What T-Pot version are you currently using (only T-Pot 24.04.x is currently supported)? 24.04
  • What architecture are you running on (i.e. hardware, cloud, VM, etc.)?VM proxmox
  • Review the ~/install_tpot.log, attach the log and highlight the errors.
  • How long has your installation been running? Fresh hive and sensor install ( used standard before)
  • Did you install upgrades, packages or use the update script? NO
  • Did you modify any scripts or configs? If yes, please attach the changes. NO
  • Please provide a screenshot of htop and docker stats.

Image

Image

  • How much free disk space is available (df -h)?

Image

  • What is the current container status (dps)?
  • On Linux: What is the status of the T-Pot service (systemctl status tpot)?

Image

  • What ports are being occupied? Stop T-Pot systemctl stop tpot and run grc netstat -tulpen

Image

  • Stop T-Pot systemctl stop tpot
  • Run grc netstat -tulpen
  • Run T-Pot manually with docker compose -f ~/tpotce/docker-compose.yml up and check for errors
  • Stop execution with CTRL-C and docker compose -f ~/tpotce/docker-compose.yml down -v
  • If a single container shows as DOWN you can run docker logs <container-name> for the latest log entries

trying to add a sensor but facing this issue upon running ./deploy.sh i followed the guide have done the keygen and certs

fatal: [10.100.2.2]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_discovered_interpreter_python": "/usr/bin/python3"}, "exception": "Traceback (mole/tmp/ansible-tmp-1737624708.5109515-52804-205121557698399/AnsiballZ_setup.py\"ile \"/home/f12admin/.ansible/tmp/ansible-tmp-1737624708.5109515-52804-205121557n\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/hom52804-205121557698399/AnsiballZ_setup.py\", line 37, in invoke_module\r\n frosible_ansible.legacy.setup_payload_6ymjnd23/ansible_ansible.legacy.setup_payloadule>\r\nModuleNotFoundError: No module named 'ansible.module_utils.six.moves'\r\ to 10.100.2.2 closed.\r\n", "module_stdout": "Traceback (most recent call last)737624708.5109515-52804-205121557698399/AnsiballZ_setup.py\", line 102, in <modu/.ansible/tmp/ansible-tmp-1737624708.5109515-52804-205121557698399/AnsiballZ_setle(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/f12admin/.ansible/9/AnsiballZ_setup.py\", line 37, in invoke_module\r\n from ansible.module_uti.setup_payload_6ymjnd23/ansible_ansible.legacy.setup_payload.zip/ansible/module_ndError: No module named 'ansible.module_utils.six.moves'\r\n", "msg": "MODULE F}}, "msg": "The following modules failed to execute: ansible.legacy.setup\n"}

@t3chn0m4g3 t3chn0m4g3 marked this as a duplicate of #1746 Jan 24, 2025
@RyanInsolencee
Copy link
Author

just to give more info as previous post the template wasnt filled up

@t3chn0m4g3 t3chn0m4g3 self-assigned this Jan 24, 2025
@t3chn0m4g3
Copy link
Member

t3chn0m4g3 commented Jan 24, 2025

Cannot reproduce...

I just setup a Hive and then a Sensor using Ubuntu (as provided in the ReadMe).
Copied the SSH Key from the Hive to the Sensor (make sure to use port/64295).
Ran the deploy.sh on the Hive with all the necessary info.
Works as advertised.

Click here for the Sensor Installation Screencast

asciicast

Click here for the deployment log Hive > Sensor
./deploy.sh 

 ____   [ T-Pot ]                  ____             _
/ ___|  ___ _ __  ___  ___  _ __  |  _ \  ___ _ __ | | ___  _   _
\___ \ / _ \  _ \/ __|/ _ \|  __| | | | |/ _ \  _ \| |/ _ \| | | |
 ___) |  __/ | | \__ \ (_) | |    | |_| |  __/ |_) | | (_) | |_| |
|____/ \___|_| |_|___/\___/|_|    |____/ \___| .__/|_|\___/ \__, |
                                             |_|            |___/

# This script will prepare a T-Pot SENSOR installation to transmit logs into this HIVE.

# Was a T-Pot SENSOR installed? (y/n): y
# Enter the remote username T-Pot SENSOR was installed with: marco
# Enter the IP/domain name of the SENSOR: 172.20.254.145
# Has a SSH key been deployed to the SENSOR? (y/n): y
# Enter the IP/domain name of this HIVE: 172.20.254.136
# The following SENSOR credentials have been created:
# New SENSOR username: sensor-progressive-turnrounds
# New SENSOR passowrd: K0YrLuuO8UfOPsPQ777hZk0DkQXmrJs0
# New htpasswd encoded credentials: sensor-progressive-turnrounds:$apr1$f1N1Brfp$5HXdeBJSBLpcPKrdSLBj10
# New htpasswd credentials base64 encoded: c2Vuc29yLXByb2dyZXNzaXZlLXR1cm5yb3VuZHM6JGFwcjEkZjFOMUJyZnAkNUhYZGVCSlNCTHBjUEtyZFNMQmoxMA==
# New SENSOR credentials base64 encoded: c2Vuc29yLXByb2dyZXNzaXZlLXR1cm5yb3VuZHM6SzBZckx1dU84VWZPUHNQUTc3N2haazBEa1FYbXJKczA=

# Ansible will ask for the ‘BECOME password‘ which is typically the password you ’sudo’ with on the SENSOR.
# The password will allow Ansible to run a reboot via sudo on the SENSOR.

BECOME password: 

PLAY [T-POT Sensor Deployment] ************************************************************************************************************************************************************************************************************

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

TASK [Ensure the destination directory exists] ********************************************************************************************************************************************************************************************
ok: [172.20.254.145]

TASK [Copy nginx.crt from local to remote host] *******************************************************************************************************************************************************************************************
changed: [172.20.254.145]

TASK [Copy sensor.yml to docker-compose.yml on the remote host] ***************************************************************************************************************************************************************************
changed: [172.20.254.145]

TASK [Update T-POT_HIVE_USER in .env] *****************************************************************************************************************************************************************************************************
changed: [172.20.254.145]

TASK [Update T-POT_HIVE_IP in .env] *******************************************************************************************************************************************************************************************************
changed: [172.20.254.145]

TASK [Ensure T-POT_TYPE is set to SENSOR in .env] *****************************************************************************************************************************************************************************************
changed: [172.20.254.145]

TASK [Ensure WEB_USER is empty in .env] ***************************************************************************************************************************************************************************************************
ok: [172.20.254.145]

TASK [Ensure LS_WEB_USER is empty in .env] ************************************************************************************************************************************************************************************************
ok: [172.20.254.145]

TASK [Reboot the sensor] ******************************************************************************************************************************************************************************************************************
changed: [172.20.254.145]

PLAY RECAP ********************************************************************************************************************************************************************************************************************************
172.20.254.145             : ok=10   changed=6    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

Based on the logs you provided I am assuming something else went wrong, either during the installation of the Sensor or the Hive. You did run the T-Pot installer on the Sensor, too, right? Otherwise the deployment will not work and would also clarify why Ansible is seemingly missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants