# System settings for an ingest kiosk

- block:
    - name: install policykit overrides for udev automounting
      template:
        src: 99-udisks-allowzoox.pkla.j2
        dest: /etc/polkit-1/localauthority/50-local.d/99-udisks-allowzoox.pkla
      tags:
        - kiosk_host
        - kiosk_system

    - name: install udev automount file
      template:
        src: 99-zooxdata.rules.j2
        dest: /etc/udev/rules.d/99-zooxdata.rules
      tags:
        - kiosk_host

    - name: install udev automount file
      template:
        src: 99-zooxusb.rules.j2
        dest: /etc/udev/rules.d/99-zooxusb.rules
      tags:
        - kiosk_host

    - name: make ingest log directory under /var
      file:
        path: "{{INGEST_LOGDIR}}"
        owner: "{{INGEST_USER}}"
        group: "{{INGEST_GROUP}}"
        state: directory
      tags:
        - kiosk_host
        - kiosk_system

    - name: install logrotate rules
      template:
        src: zooxops-ingest.logrotate.j2
        dest: /etc/logrotate.d/zooxops-ingest
      tags:
        - kiosk_host
        - kiosk_system

  become: yes
