Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSTGIS task fails #251

Open
prawl opened this issue Jul 11, 2017 · 0 comments
Open

POSTGIS task fails #251

prawl opened this issue Jul 11, 2017 · 0 comments

Comments

@prawl
Copy link

prawl commented Jul 11, 2017

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
@prawl prawl changed the title POSTGIS extension fails POSTGIS task fails Jul 11, 2017
dkniffin added a commit to dkniffin/postgresql that referenced this issue Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants