summaryrefslogtreecommitdiffstats
path: root/ansible
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@eficode.com>2019-12-28 21:35:01 +0200
committerJan Tuomi <jan.tuomi@eficode.com>2019-12-28 21:35:01 +0200
commit3b50c13ca1691e64ae9382ec658216b49477088e (patch)
treec622c6174ecd073874daac6eda151ec5a64d95de /ansible
Initial commit
Diffstat (limited to 'ansible')
-rw-r--r--ansible/deploy-playbook.yaml20
1 files changed, 20 insertions, 0 deletions
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"