Skip to content

Commit

Permalink
Assert that database username and password are defined.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbaassssiiee committed Oct 2, 2023
1 parent 9c1f1fc commit 374f742
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@
timeout: 120
sleep: 10

- 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: Create user
become: true
become_user: postgres
Expand Down

0 comments on commit 374f742

Please sign in to comment.