add fallback for admin token

This commit is contained in:
2022-11-19 14:26:29 +01:00
parent c3f08a7b8f
commit 3c463400ca

View File

@@ -12,4 +12,8 @@
ts3_admin_token: "{{ item | regex_search('.*\\|token=(.*)$', '\\1') | first }}"
when:
- "'|token=' in item"
loop: "{{ ts3_log_content.stdout_lines }}"
loop: "{{ ts3_log_content.stdout_lines }}"
rescue:
- name: "Set token to nothing"
ansible.builtin.set_fact:
ts3_admin_token: ""