telekom-security / tpotce

🍯 T-Pot - The All In One Multi Honeypot Platform 🐝
GNU General Public License v3.0
6.86k stars 1.08k forks source link

[DEV] Docker Installation Fails on Ubuntu Due to Incorrect Architecture Naming in Ansible Playbook #1472

Closed shark4ce closed 9 months ago

shark4ce commented 9 months ago

Summary

Attempting to install the T-Pot platform on Ubuntu results in a failure during the Docker Engine installation step, with an error indicating that the package docker-ce is not available. The root cause is identified as incorrect architecture naming in the Ansible playbook (tpot.yml), specifically in the task that adds the Docker Engine repository for Debian, Raspbian, and Ubuntu environments.

Environment

Issue Description

During the T-Pot installation, the Ansible playbook fails to install Docker Engine due to the repository configuration not recognizing x86_64 as a valid architecture, which Docker expects to be named amd64. The affected task is "Add Docker Engine repository (Debian, Raspbian, Ubuntu)", which lacks the necessary normalization of ansible_architecture from x86_64 to amd64.

Reproduction Steps

  1. Run install.sh on an Ubuntu system.
  2. Observe the failure during the Docker Engine installation phase.

Expected Behavior

To ensure compatibility across all supported architectures, the playbook must include the normalization of x86_64 to amd64 for the Docker Engine repository configuration. Currently, while normalizations for other architectures are in place, this specific conversion is absent. Adding it will guarantee the availability of the docker-ce package for installation on systems using the x86_64 architecture.

Actual Behavior

The playbook fails to find the docker-ce package due to incorrect repository configuration, resulting in the error: "msg": "No package matching 'docker-ce' is available".

Screenshot

image

Suggested Fix

Modify the playbook to include normalization from x86_64 to amd64 for the Docker Engine repository configuration step:


- name: Add Docker Engine repository (Debian, Raspbian, Ubuntu)
  repo: "deb [arch={{ ansible_architecture | regex_replace('^(aarch64)$', 'arm64') | regex_replace('^(x86_64)$', 'amd64') }}...
t3chn0m4g3 commented 9 months ago

@shark4ce Thanks for taking the time to test, debug and the solution! Just pushed the fix, please let me know if this works now.

Thank you!

shark4ce commented 9 months ago

@t3chn0m4g3 Yes, it is working. Thank you!

t3chn0m4g3 commented 9 months ago

Thanks for the feedback @shark4ce!