---
# TODO mount the repos: `192.168.1.128:/tank/repos       /tank/iocage/jails/gogs1/root/var/db/gogs/repositories  nfs     rw      0       0``
- name: Gogs package installed
  community.general.pkgng:
    name: "gogs"
    state: latest

- name: Gogs enabled
  shell: sysrc gogs_enable="YES"

- name: Git user in wheel group
  shell: pw groupmod wheel -m git

- name: Gogs ini file installed
  template:
    src: app.ini
    dest: /usr/local/etc/gogs/conf/app.ini
    owner: git
    mode: 0666
  notify: Gogs restarted

- name: Gogs started
  service: name=gogs state=started
