Skip to content

Commit

Permalink
[ansible/artifactory] Assert that database username and password are …
Browse files Browse the repository at this point in the history
…defined. (#336)

* Assert that database username and password are defined.

Signed-off-by: Bas Meijer <[email protected]>

* Assertion at the start of the postgres role.

---------

Signed-off-by: Bas Meijer <[email protected]>
  • Loading branch information
bbaassssiiee authored and chukka committed Oct 26, 2023
1 parent 3924c61 commit 0834442
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
- name: Assert database username and password are defined
ansible.builtin.assert:
that:
- curr_user.username is defined
- curr_user.password is defined
loop: "{{ database | dict2items | map(attribute='value') | list }}"
loop_control:
loop_var: curr_user
when: curr_user.enabled | bool

- name: Define OS-specific variables
ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"

Expand Down

0 comments on commit 0834442

Please sign in to comment.