Skip to content

Commit

Permalink
Merge pull request #53 from systemli/Remove-secrets-variable-from-role
Browse files Browse the repository at this point in the history
Remove secrets variable from role
  • Loading branch information
doobry-systemli authored Oct 22, 2023
2 parents e9b1ebe + 4dc758b commit 450b019
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
userli_version: "3.2.2"
userli_mysql_user: "userli"
userli_mysql_password: "{{ secrets_userli_mysql_password }}"
userli_mysql_password: ""
userli_mysql_db: "userli"
userli_mysql_priv: "{{ userli_mysql_db }}.*:ALL"
userli_db_type: mysql
Expand Down
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- name: Preflight checks
ansible.builtin.include_tasks: preflight.yml

- name: Ensure group is present
ansible.builtin.group:
name: "{{ userli_group }}"
Expand Down
7 changes: 7 additions & 0 deletions tasks/preflight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
- name: Assert that required variables are set
ansible.builtin.assert:
that:
- userli_mysql_password is defined and userli_mysql_password != ""
fail_msg: "userli_mysql_password is not defined or empty"
success_msg: "userli_mysql_password is defined and not empty"

0 comments on commit 450b019

Please sign in to comment.