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.
This commit is contained in:
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

View file

@ -213,6 +213,11 @@
state: reloaded
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
command: cat /home/{{ gophish_user }}/gophish_deploy/gophish.log
register: gophish_log