Adding addtinal files

This commit is contained in:
Ryan Toler
2024-10-02 01:29:06 -05:00
parent 216f3bb81d
commit 43647d5eb2
11 changed files with 319 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
- name: Install required packages
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
state: present
update_cache: yes
- name: Add Docker GPG key
apt_key:
url: https://download.docker.com/linux/debian/gpg
state: present
- name: Add Docker repository
apt_repository:
repo: deb [arch=amd64] https://download.docker.com/linux/debian bookworm stable
state: present
- name: Install Docker Engine
apt:
name:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose-plugin
state: present
update_cache: yes
- name: Create docker user
user:
name: docker
uid: 2000
group: docker
state: present
create_home: yes
home: /home/docker
shell: /bin/bash
- name: Add key for docker user
ansible.posix.authorized_key:
user: docker
state: present
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIjMDDhinpnCPFUMERa/tLYymzRI8oJoAvXZnBH9wpA4 fake@gmail.com"
- name: Start Docker service
systemd:
name: docker
state: started
enabled: yes