feat: install docker and start hello world container
Some checks failed
Provision & Configure / Terraform Apply (push) Has been cancelled
Some checks failed
Provision & Configure / Terraform Apply (push) Has been cancelled
This commit is contained in:
0
.ansible/.lock
Normal file
0
.ansible/.lock
Normal file
1
ansible/.gitignore
vendored
Normal file
1
ansible/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
inventory.ini
|
16
ansible/main.yml
Normal file
16
ansible/main.yml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
- name: Configure Docker all hosts
|
||||||
|
hosts: all
|
||||||
|
become: true
|
||||||
|
roles:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Delete existing hello world container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: "les-06"
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Start hello world container
|
||||||
|
community.docker.docker_container:
|
||||||
|
name: "les-06"
|
||||||
|
image: "gitea.ditmarvisser.net/hbo-ict/les-06:latest"
|
11
ansible/roles/docker/tasks/main.yml
Normal file
11
ansible/roles/docker/tasks/main.yml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
- name: Installeer Docker
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: docker.io
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Start en enable Docker service
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: docker
|
||||||
|
state: started
|
||||||
|
enabled: true
|
Reference in New Issue
Block a user