added the a preparing ansible playbooks for automating new servers

This commit is contained in:
rezayaghobi-dev
2026-08-23 22:11:09 +03:30
parent e8422c0006
commit aedfdbddb7
73 changed files with 2971 additions and 44 deletions

View File

@@ -0,0 +1,41 @@
---
- name: install dependency
apt:
name: "{{item}}"
state: present
update_cache: yes
loop:
- apt-transport-https
- ca-certificates
- curl
- gnupg-agent
- software-properties-common
- name: give GPG key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
state: present
environment: "{{ proxy_env }}"
- name: add docker repo
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu bionic stable
state: present
environment: "{{ proxy_env }}"
- name: install docker
apt:
name: "{{item}}"
state: latest
update_cache: yes
loop:
- docker-ce
- docker-ce-cli
- containerd.io
environment: "{{ proxy_env }}"
- name: start and enable docker
service:
name: docker
state: started
enabled: yes