aboutsummaryrefslogtreecommitdiff
path: root/ansible/update_nginx.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/update_nginx.yml')
-rw-r--r--ansible/update_nginx.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/ansible/update_nginx.yml b/ansible/update_nginx.yml
new file mode 100644
index 0000000..fd5335d
--- /dev/null
+++ b/ansible/update_nginx.yml
@@ -0,0 +1,14 @@
+---
+ - name: Update nginx if needed
+ hosts: vps
+ become: yes
+ become_user: root
+ tasks:
+ - name: ensure nginx is at the latest version
+ apt:
+ name: nginx
+ state: latest
+ - name: ensure nginx is running
+ service:
+ name: nginx
+ state: started