mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
- hosts: datacenter
|
|
name: Install docker1
|
|
become: true
|
|
become_user: root
|
|
gather_facts: false
|
|
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
|
|
- 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]
|
|
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -H tcp://0.0.0.0:2375
|
|
|
|
|
|
|
|
- name: Restart docker service
|
|
ansible.builtin.service:
|
|
name: docker.service
|
|
state: restarted
|
|
|