- name: install reg-server
  package:
    name: reg
  tags:
  - regserver

- name: Copy reg-server repositories html template
  copy:
    src: "{{files}}/reg-server/repositories.html"
    dest: "/var/lib/reg-server/templates/repositories.html"
  tags:
  - regserver

- name: Copy reg-server tags html template
  copy:
    src: "{{files}}/reg-server/tags.html"
    dest: "/var/lib/reg-server/templates/tags.html"
  tags:
  - regserver

- name: Install cronjob file
  copy:
    src: "{{files}}/reg-server/cron-prod"
    dest: "/etc/cron.d/reg-server"
  when: env == "production"
  tags:
  - regserver

- name: Install cronjob file - stg
  copy:
    src: "{{files}}/reg-server/cron-stg"
    dest: "/etc/cron.d/reg-server"
  when: env == "staging"
  tags:
  - regserver

- name: Copy fedora icon
  copy:
    src: "{{files}}/reg-server/fedora.png"
    dest: "/var/lib/reg-server/static/fedora.png"
  tags:
  - regserver

- name: Copy custom styles.css
  copy:
    src: "{{files}}/reg-server/styles.css"
    dest: "/var/lib/reg-server/static/css/styles.css"
  tags:
  - regserver
