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 b74f61c commit 60d5421
Show file tree
Hide file tree
Showing 3 changed files with 10 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
2 changes: 2 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- name: Preflight checks
ansible.builtin.include_tasks: preflight.yml

- name: Ensure group is present
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 60d5421

Please sign in to comment.