kostiantyn-nemchenko / ansible-role-patroni

:elephant: Ansible Role for Patroni
https://galaxy.ansible.com/kostiantyn-nemchenko/patroni
MIT License
68 stars 44 forks source link

Allow variables overwrite from group_vars/host_vars #83

Closed wilfriedroset closed 4 years ago

wilfriedroset commented 4 years ago

The current implementation is loading variables from vars/ directory when the role is evaluated. Doing so prevent user to overwrite them in their group_vars/host_vars. A user can have several patroni clusters targeted by the same playbook, example:

- name: Configure PostgreSQL
  hosts: role_patroni_server
  any_errors_fatal: true
  become: true
  become_user: root
  roles:
    - kostiantyn-nemchenko.patroni

This PR follow the same implementation used by Jeff Geerling in each of its roles (kudos to him).

kostiantyn-nemchenko commented 4 years ago

@wilfriedroset thank you for this PR! I suggested few minor changes to follow the same naming convention. Please, resolve conversations if you are fine with it, and I will merge the PR.

wilfriedroset commented 4 years ago

thank you for your feedback. I've applied your suggestion.

kostiantyn-nemchenko commented 4 years ago

@wilfriedroset merged. Thank you!