Homelab/host_init/2-docker.yml

25 lines
642 B
YAML
Raw Normal View History

2024-02-06 20:36:51 +00:00
- name: Install Docker on Alpine Linux
hosts: all
tasks:
- name: Enable community packages
ansible.builtin.lineinfile:
path: /etc/apk/repositories
regexp: "^#http://dl-cdn.alpinelinux.org/alpine/v3.18/community"
line: "http://dl-cdn.alpinelinux.org/alpine/v3.18/community"
2024-02-06 20:36:51 +00:00
state: present
- name: Update apk packages
community.general.apk:
update_cache: true
- name: Install docker with apk
community.general.apk:
name: docker
- name: Start docker service
ansible.builtin.service:
name: docker
state: started
enabled: true