diff --git a/defaults/main.yml b/defaults/main.yml index 7bd2ba9..17f2701 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml index f08f428..f7ff862 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,7 @@ --- +- name: Preflight checks + ansible.builtin.include_tasks: preflight.yml + - name: Ensure group is present ansible.builtin.group: name: "{{ userli_group }}" diff --git a/tasks/preflight.yml b/tasks/preflight.yml new file mode 100644 index 0000000..7babe77 --- /dev/null +++ b/tasks/preflight.yml @@ -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"