Skip to content

Commit

Permalink
Remove secrets variable from role
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Sep 19, 2023
1 parent 9f66715 commit 4dc758b
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.1"
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 4dc758b

Please sign in to comment.