# Instance configuration for Baserock general-purpose webserver. # # Tested against Fedora 26 base image. --- - hosts: webserver become: yes become_method: sudo tasks: - import_tasks: ../tasks/create-data-volume.yml vars: lv_name: webserver lv_size: 145g mountpoint: /srv - name: /srv/download.baserock.org/ file: path: /srv/download.baserock.org/ owner: "{{ ansible_user_id }}" state: directory - name: Create the nginx configuration files template: src: files/{{ item }} dest: /etc/nginx/sites-available/{{ item }} become: yes notify: - restart nginx with_items: - download-baserock-org.conf - irclogs-baserock-org.conf - name: Enable nginx sites file: src: ../sites-available/{{ item }} dest: /etc/nginx/sites-enabled/{{ item }} state: link become: yes notify: - restart nginx with_items: - download-baserock-org.conf - irclogs-baserock-org.conf handlers: - name: restart nginx service: name: nginx state: restarted become: yes