2023-12-05 12:21:17 +01:00
|
|
|
- hosts: datacenter
|
|
|
|
name: Install docker1
|
2022-12-14 02:23:34 +01:00
|
|
|
become: true
|
|
|
|
become_user: root
|
2024-10-15 13:05:43 +02:00
|
|
|
gather_facts: false
|
2022-12-14 02:23:34 +01:00
|
|
|
tasks:
|
|
|
|
- name: Install docker
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: docker.io
|
|
|
|
state: present
|
|
|
|
- name: Install telnet
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: telnet
|
|
|
|
state: present
|
|
|
|
- name: Install net-tools
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: net-tools
|
|
|
|
state: present
|
|
|
|
- name: Install curl!
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name: curl
|
|
|
|
state: present
|
|
|
|
- name: Install deps...
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name:
|
|
|
|
- python3-pip
|
|
|
|
- python3-dev
|
2023-12-05 12:21:17 +01:00
|
|
|
- name: Create a directory docker.service.d
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: /etc/systemd/system/docker.service.d/
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
- name: Creating a file with content
|
|
|
|
copy:
|
|
|
|
dest: "/etc/systemd/system/docker.service.d/override.conf"
|
|
|
|
content: |
|
|
|
|
[Service]
|
2024-10-15 13:08:00 +02:00
|
|
|
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375
|