-
Notifications
You must be signed in to change notification settings - Fork 582
Open
Description
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