Add an Ansible playbook to deploy to the server

This commit is contained in:
Oliver Davies 2021-07-09 23:00:34 +01:00
parent 5d3eb4aca9
commit 8a53025fd7
3 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,2 @@
[defaults]
inventory = ./hosts.ini

View file

@ -0,0 +1,10 @@
---
- hosts: web
tasks:
- name: Pull the latest images and restart the services
shell: |
docker-compose --file docker-compose-production.yaml pull
docker-compose --file docker-compose-production.yaml up --detach
args:
chdir: oliverdavies.uk

View file

@ -0,0 +1,5 @@
[web]
188.166.154.139
[web:vars]
ansible_user=root