---

- name: create ssl cert
  include_role:
    name: certificate
  vars:
    domains: ["{{ archive_domain }}"]

- name: set up nginx
  template:
    src: nginx.d.conf.j2
    dest: /etc/nginx/nginx.d/archive.conf
    owner: root
    group: root
    mode: 0644
  notify:
    - reload nginx
  tags: ['nginx']

- name: make nginx log dir
  file:
    path: /var/log/nginx/{{ archive_domain }}
    state: directory
    owner: root
    group: root
    mode: 0755
