15 lines
462 B
YAML
15 lines
462 B
YAML
---
|
|
|
|
- name: "Get Admin Token on first installation"
|
|
when: "ts3_initial_installation"
|
|
block:
|
|
- name: "get file content"
|
|
shell: "grep '|token=' {{ ts3_base_dir }}/logs/*.log"
|
|
register: ts3_log_content
|
|
|
|
- name: "search for token"
|
|
ansible.builtin.set_fact:
|
|
ts3_admin_token: "{{ item | regex_search('.*\\|token=(.*)$', '\\1') | first }}"
|
|
when:
|
|
- "'|token=' in item"
|
|
loop: "{{ ts3_log_content.stdout_lines }}" |