Initial Commit w/ Host Playbooks
This commit is contained in:
24
host_init/2-docker.yml
Normal file
24
host_init/2-docker.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
- 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'
|
||||
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
|
||||
Reference in New Issue
Block a user