summaryrefslogtreecommitdiff
path: root/roles/install_nginx/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/install_nginx/tasks')
-rw-r--r--roles/install_nginx/tasks/main.yml26
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/install_nginx/tasks/main.yml b/roles/install_nginx/tasks/main.yml
new file mode 100644
index 0000000..5b8fe65
--- /dev/null
+++ b/roles/install_nginx/tasks/main.yml
@@ -0,0 +1,26 @@
+---
+- name: install nginx
+ pacman:
+ name: nginx
+ state: present
+
+- name: copy nginx.conf
+ copy:
+ src: nginx.conf
+ dest: /etc/nginx/nginx.conf
+
+- name: add sites-available folder
+ file:
+ path: /etc/nginx/sites-available
+ state: directory
+
+- name: add sites-enabled folder
+ file:
+ path: /etc/nginx/sites-enabled
+ state: directory
+
+- name: start and enable nginx
+ systemd:
+ name: nginx.service
+ enabled: yes
+ state: started