From 3b50c13ca1691e64ae9382ec658216b49477088e Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 28 Dec 2019 21:35:01 +0200 Subject: Initial commit --- ansible/deploy-playbook.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ansible/deploy-playbook.yaml (limited to 'ansible/deploy-playbook.yaml') diff --git a/ansible/deploy-playbook.yaml b/ansible/deploy-playbook.yaml new file mode 100644 index 0000000..3151f50 --- /dev/null +++ b/ansible/deploy-playbook.yaml @@ -0,0 +1,20 @@ +--- +- hosts: all + become: true + vars: + container_name: nginx + image_name: nginx + + tasks: + - name: Pull nginx image + docker_image: + name: "{{ default_container_image }}" + source: pull + + - name: Create nginx container + docker_container: + name: "{{ container_name }}" + image: "{{ image }}" + state: started + ports: + - "80:80" -- cgit v1.3