---
- name: Dependencies installed
  pkgng:
    name: py39-pip,py39-sqlite3,postgresql14-client,rust,jpeg-turbo,tiff,webp,freetype2
    state: latest

- name: Pgadmin package installed
  shell: "pip install pgadmin4"

- name: Pgadmin rc file installed
  ansible.builtin.copy:
    src: pgadmin.rc
    dest: /usr/local/etc/rc.d/pgadmin
    mode: a+x
  notify: Pgadmin restarted

- name: Pgadmin enabled
  shell: sysrc pgadmin_enable="YES"

- name: Pgadmin started
  service: name=pgadmin state=started
