From 9d61eaba155ad55ff3e4931af589d09d6257b1f8 Mon Sep 17 00:00:00 2001 From: Louis Date: Sat, 3 Jun 2023 16:45:37 +0200 Subject: [PATCH] nginx --- roles/nginx/handlers/main.yml | 5 +++++ roles/nginx/tasks/main.yml | 10 ++++++++++ s-web.yml | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 roles/nginx/handlers/main.yml create mode 100644 roles/nginx/tasks/main.yml diff --git a/roles/nginx/handlers/main.yml b/roles/nginx/handlers/main.yml new file mode 100644 index 0000000..6deed0c --- /dev/null +++ b/roles/nginx/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: restart nginx + service: + name: nginx + state: restarted diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml new file mode 100644 index 0000000..593d5ba --- /dev/null +++ b/roles/nginx/tasks/main.yml @@ -0,0 +1,10 @@ +--- +- name: apt update + apt: + update_cache: yes + cache_valid_time: 3600 + +- name: Install nginx + apt: + pkg: + - nginx \ No newline at end of file diff --git a/s-web.yml b/s-web.yml index c42e866..bc64972 100644 --- a/s-web.yml +++ b/s-web.yml @@ -7,5 +7,5 @@ - ssh-cli - syslog-cli - snmp-agent - - apache2only + - nginx - post