INF-113 - nginx ansible role
Initial commit
disabled the default site, and added default_site as an option
Use nginx repo for newer version
Change-Id: I994a1f2f2f18cc2d1c42a2d9bb7321835a5dd1a1
diff --git a/handlers/main.yml b/handlers/main.yml
new file mode 100644
index 0000000..ee748ab
--- /dev/null
+++ b/handlers/main.yml
@@ -0,0 +1,28 @@
+---
+# nginx handlers/main.yml
+#
+# SPDX-FileCopyrightText: © 2020 Open Networking Foundation <support@opennetworking.org>
+# SPDX-License-Identifier: Apache-2.0
+
+- name: test-nginx-config
+ # test that the entire set of config files are correct
+ #
+ # NOTE: handlers are run in the order they are listed in this file, so it's
+ # listed first before starting/reloading/restarting the daemon
+ command:
+ cmd: "nginx -t -c {{ nginx_conf_dir }}/nginx.conf"
+
+- name: start-nginx
+ service:
+ name: "{{ nginx_service }}"
+ state: started
+
+- name: reload-nginx
+ service:
+ name: "{{ nginx_service }}"
+ state: reloaded
+
+- name: restart-nginx
+ service:
+ name: "{{ nginx_service }}"
+ state: restarted