Changeset - 8c929b927c0d
[Not reviewed]
0 0 1
x - 19 months ago 2023-10-09 19:52:44
xbr@c3l.lu
feat: add nginx config copying
1 file changed with 21 insertions and 0 deletions:
0 comments (0 inline, 0 general)
web/set_up_nginx_config.yml
Show inline comments
 
new file 100644
 
---
 
- name: Install nginx
 
  ansible.builtin.apt:
 
    name: nginx
 
    state: present
 
- name: Install nginx config
 
  ansible.builtin.copy:
 
    src: "{{ server_config_dir }}/server_config/nginx/configs/{{ web_conf_file }}"
 
    dest: "/etc/nginx/sites-available/"
 
    owner: root
 
    group: root
 
    mode: "0644"
 
  notify: Restart Nginx
 
- name: Enable new config site
 
  ansible.builtin.file:
 
    src: "/etc/nginx/sites-available/{{ web_conf_file }}"
 
    dest: "/etc/nginx/sites-enabled/{{ web_conf_file }}"
 
    owner: root
 
    group: root
 
    state: link
 
  notify: Restart Nginx
0 comments (0 inline, 0 general)