Skip to content

Instantly share code, notes, and snippets.

@jackregnart
Created June 18, 2019 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackregnart/b21aa852877317436012af4c0f27f293 to your computer and use it in GitHub Desktop.
Save jackregnart/b21aa852877317436012af4c0f27f293 to your computer and use it in GitHub Desktop.
---
- hosts: dhis
become: yes
vars_files:
- vars/main.yml
roles:
- geerlingguy.postgresql
tasks:
- name: Install postgis
apt:
name:
["postgresql-{{ postgresql_version }}-postgis-2.4"]
- name: Ensure postgis
become_user: "{{ postgresql_user }}"
become: yes
postgresql_ext:
name: postgis
db: "{{ postgresql_dhis_db }}"
vars:
ansible_ssh_pipelining: true
- name: Creating DHIS conf dir
become_user: dhis
become: yes
file:
path: "{{ dhis2_config_dir }}"
state: directory
- name: Creating DHIS conf file
become_user: dhis
become: yes
template:
src: configs/dhis2.conf
dest: "{{ dhis2_config_path }}"
owner: dhis
group: dhis
mode: 0600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment