diff options
author | Aaron LI <aly@aaronly.me> | 2017-06-14 23:24:36 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-14 23:24:36 +0800 |
commit | 147a93b2f08d1bb62ca6946a8ddff2974e418401 (patch) | |
tree | a2454e913f15a9c1a283995e91520d0edd81efe2 /roles/nginx/tasks | |
parent | d9bfda6c292c6b90eb7ba295425a74679e6d9c13 (diff) | |
download | debian-hpc-147a93b2f08d1bb62ca6946a8ddff2974e418401.tar.bz2 |
Add basic nginx role
Diffstat (limited to 'roles/nginx/tasks')
-rw-r--r-- | roles/nginx/tasks/main.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml new file mode 100644 index 0000000..d3a6204 --- /dev/null +++ b/roles/nginx/tasks/main.yml @@ -0,0 +1,30 @@ +--- +- name: Ensure that the Apache web server is not installed + apt: + name: "{{ item }}" + state: absent + with_items: "{{ apache_packages_to_remove }}" + +- name: Install Nginx + apt: + name: nginx + state: present + +- name: Update Nginx configuration + copy: + src: nginx.conf + dest: /etc/nginx/nginx.conf + owner: root + group: root + mode: 0644 + notify: Restart Nginx + +- name: Set up Nginx sites + file: + path: /etc/nginx/{{ item }} + state: directory + with_items: + - sites-available + - sites-enabled + +# vim: set ft=yaml sw=2: |