Wait before grabbing logfile

This waits for gophish to start, before grabbing logfile. If the wait is missing, it grabs logfile before password is written to the file.
pull/2777/head
sinihabe 2023-02-23 22:39:53 +02:00 committed by GitHub
parent d2efb18ef1
commit 105ff7a9a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -213,6 +213,11 @@
state: reloaded state: reloaded
enabled: yes enabled: yes
- name: Wait for gophish to start
ansible.builtin.wait_for:
path: /opt/gophish/gophish.log
search_regex: "Starting admin server"
- name: get Gophish log file which contain initial password - name: get Gophish log file which contain initial password
command: cat /home/{{ gophish_user }}/gophish_deploy/gophish.log command: cat /home/{{ gophish_user }}/gophish_deploy/gophish.log
register: gophish_log register: gophish_log