From 1dccd456c8ce9ce1526325c0c1eaac9b993c14f8 Mon Sep 17 00:00:00 2001 From: ace Date: Fri, 10 Feb 2023 14:34:38 +0300 Subject: [PATCH] fix vars --- tasks/Debian/install.yaml | 4 +++- tasks/main.yaml | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tasks/Debian/install.yaml b/tasks/Debian/install.yaml index b510454..9b036ca 100644 --- a/tasks/Debian/install.yaml +++ b/tasks/Debian/install.yaml @@ -27,8 +27,10 @@ postgresql_installed_package: "{{ ansible_facts.packages[postgresql_package_name][0]['name'] }}" when: postgresql_package_name in ansible_facts.packages -- debug: +- name: Print installed PostgreSQL version + debug: msg: "{{ ansible_facts.packages[postgresql_package_name][0]['version'] }}" + verbosity: 2 when: postgresql_installed_package is defined - name: Mask PostgreSQL before install diff --git a/tasks/main.yaml b/tasks/main.yaml index fb65753..a1d3096 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -12,6 +12,22 @@ - "vars" tags: postgresql_vars +- name: Load host variables to override role vars + include_vars: + dir: "{{ inventory_dir }}/host_vars" + ignore_unknown_extensions: True + extensions: + - '' + tags: postgresql_override_role_vars + +- name: Load group variables to override role vars + include_vars: + dir: "{{ inventory_dir }}/group_vars" + extensions: + - "yaml" + - "yml" + tags: postgresql_override_role_vars + - name: "Set locale for PostgreSQL" include_tasks: locale.yaml tags: postgresql_locale