Skip to content

POSTGIS task fails #251

Description

@prawl

When setting up a production instance I ran into this issue with the postgis task. The error would report that item is not found from the file postgresql/tasks/extensions/postgis.yml

We got it working by changing the path in that above file with a change to the relative paths of the with_first_found:.

Before

# file: postgresql/tasks/extensions/postgis.yml

- include_vars: "{{ item }}"
  with_first_found:
    - "../vars/{{ ansible_distribution_release }}.yml"
    - "../vars/empty.yml"

- name: PostgreSQL | Extensions | Make sure the postgis extensions are installed
  apt:
    name: "{{item}}"
    state: present
    update_cache: yes
    cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
  with_items: "{{ postgresql_ext_postgis_deps }}"
  notify:
    - restart postgresql

After (fix applied)

# file: postgresql/tasks/extensions/postgis.yml

- include_vars: "{{ item }}"
  with_first_found:
    - "../../vars/{{ ansible_distribution_release }}.yml"  <<<<<<<<<< Added ../ to the path
    - "../../vars/empty.yml"                    <<<<<<<<<<<<<< Added ../ to the path

- name: PostgreSQL | Extensions | Make sure the postgis extensions are installed
  apt:
    name: "{{item}}"
    state: present
    update_cache: yes
    cache_valid_time: "{{apt_cache_valid_time | default (3600)}}"
  with_items: "{{ postgresql_ext_postgis_deps }}"
  notify:
    - restart postgresql

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions