--- # Sets up nginx for the specific config file - 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