summaryrefslogtreecommitdiffstats
path: root/ansible/deploy-playbook.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/deploy-playbook.yaml')
-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"