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
|
2024-03-05 21:20:55 +00:00
|
|
|
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
|