first commit

This commit is contained in:
2021-08-28 23:54:41 +08:00
commit 06f4bf327a
55 changed files with 650 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
---
- name: comment {{ip}} in upstream.conf
shell: cd /etc/nginx/conf.d && sed -i "/^ *server {{ip}}/s/^/#/" upstream.conf && nginx -s reload

View File

@@ -0,0 +1,4 @@
---
- name: uncomment {{ip}} in upstream.conf
shell: cd /etc/nginx/conf.d && sed -i "/^# *server {{ip}}/s/^#//" upstream.conf && nginx -s reload

View File

@@ -0,0 +1,3 @@
---
- import_tasks: "{{task|lower}}.yml"

View File

@@ -0,0 +1,4 @@
---
- name: restart nginx
service: name=nginx state=restarted

View File

@@ -0,0 +1,4 @@
---
- name: start nginx
service: name=nginx state=started

View File

@@ -0,0 +1,4 @@
---
- name: stop nginx
service: name=nginx state=stopped