{"id":26219295,"url":"https://github.com/khalil-as/ansible_docker_install","last_synced_at":"2026-04-20T03:34:01.750Z","repository":{"id":280603465,"uuid":"942545702","full_name":"Khalil-AS/ansible_docker_install","owner":"Khalil-AS","description":"Install Docker on Debian 12 box","archived":false,"fork":false,"pushed_at":"2025-03-04T16:27:29.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T01:34:50.140Z","etag":null,"topics":["ansible-role","debian-linux","docker","installation"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Khalil-AS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-04T09:20:06.000Z","updated_at":"2025-03-04T16:27:33.000Z","dependencies_parsed_at":"2025-03-12T01:34:54.174Z","dependency_job_id":"93527ddc-4991-4290-9db9-88358b480319","html_url":"https://github.com/Khalil-AS/ansible_docker_install","commit_stats":null,"previous_names":["kharune/ansible_docker_install","khalil-as/ansible_docker_install"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khalil-AS%2Fansible_docker_install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khalil-AS%2Fansible_docker_install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khalil-AS%2Fansible_docker_install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khalil-AS%2Fansible_docker_install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Khalil-AS","download_url":"https://codeload.github.com/Khalil-AS/ansible_docker_install/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230096,"owners_count":20257645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible-role","debian-linux","docker","installation"],"created_at":"2025-03-12T14:17:11.164Z","updated_at":"2025-10-14T03:59:49.945Z","avatar_url":"https://github.com/Khalil-AS.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"🚀 **Ansible Role: Docker Installation**\n\n📌 **Overview**\n\nThis Ansible role automates the installation and configuration of Docker on Debian-based systems. It ensures that Docker is properly set up with the latest stable version and configures the system for optimal containerized application deployment.\n\n✅ **Features**\n\n✔️ Removes old Docker packages (if any)\n\n✔️ Updates system packages\n\n✔️ Installs Docker and its dependencies\n\n✔️ Configures Docker to start on boot\n\n✔️ Adds the user to the docker group\n\n✔️ Ensures Docker is running and verifies installation\n\n📋 **Prerequisites**\n\n🛠 Supported Operating Systems (Tested)\n\n    Debian 12+\n\n⚙️ **Required Dependencies**\n\nEnsure the control machine has:\n\n    ansible-core 2.15.13\n\n    Python 3.9.21\n\n    community.docker 4.4.0\n\n    Paramiko 3.5.1\n\nEnsure the target machine has:\n\n    Internet access (for package downloads)\n    \n    Python 3.11.2\n\n🔑 **Privileges**\n\n    Run playbooks as a user with sudo privileges and SSH key-based authentication.\n\n    In this role, the default user is control.\n\n🚀 **Quick Start Guide**\n\n1️⃣ **Install the Role**\n\nClone this repository or download it:\n\n    git clone https://github.com/Kharune/ansible_docker_install.git\n    cd ansible-role-docker\n\n2️⃣ **Configure Inventory, Playbook, and Ansible Configuration**\n\nBefore running the playbook, ensure the following files are properly configured based on your environment.\n\nInventory Configuration (hosts.yml)\n\n    lab:\n      vars:\n        ansible_python_interpreter: auto_silent\n      hosts:\n        192.168.253.130:22450  # Change this based on your environment and ssh port, if default used remove (:ssh_port)\n    preprod:\n      children:\n        lab:\n\nPlaybook Configuration (PB_deploy_docker.yml)\n\n    ---\n    - name: Install Docker on Debian\n      hosts: preprod  # Change this based on your target group\n      remote_user: control  # Change this based on your user\n      become: true\n      roles:\n        - docker_install\n\nAnsible Configuration (ansible.cfg)\n\nEnsure your Ansible configuration is set correctly:\n\n    [defaults]\n    inventory=/home/control/ansible_docker_install/hosts.yml  # Change to your inventory file\n    transport=paramiko  # Change if you don't use paramiko\n\n3️⃣ **Run the Playbook**\n\nRun the playbook:\n\n    ansible-playbook PB_deploy_docker.yml\n\n🐳**Demo**\n\n\nhttps://github.com/user-attachments/assets/104e1157-1c16-4a47-b34b-15b4da9fb7af\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalil-as%2Fansible_docker_install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalil-as%2Fansible_docker_install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalil-as%2Fansible_docker_install/lists"}