Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the Ansible Playbook #2138

Merged
merged 6 commits into from
Dec 23, 2021
Merged

Updated the Ansible Playbook #2138

merged 6 commits into from
Dec 23, 2021

Conversation

philomath213
Copy link
Contributor

Hello
I have made some changes to Ansible Playbook.

Changes

  • Some linting on Ansible tasks file.
  • Ensure Gophish binary is executable.
  • Download the latest release using GitHub API.
  • Print logs file after installing Gophish in order to get the initial temporary password.
  • Update Ansible Playbook README.

Have a nice day!

@glennzw
Copy link
Collaborator

glennzw commented Dec 22, 2021

Hi @philomath213, thanks so much for sending this through! I just ran a test to deploy to an Ubuntu 20.04 LTS server and got the following error:

TASK [gophish : Install specified packages.] ***************************************************************************************************************************************************************
fatal: [206.189.x.x]: FAILED! => {"changed": false, "msg": "No package matching 'python-pip' is available"}

Presumably because Python2 is EOL. I modified roles/gophish/vars/main.yml to replace python-pip with python3-pip, which seems to work now.

Could you verify this fix on your side, and make the change in your commit if this seems right?

Also something I noticed; the playbook outputs the password in the log with the task TASK [gophish : display log file], but then the machine reboots and a new random password is set (so the displayed password is no longer valid and you'd need to go manually check the gophish.log file). Not sure if there's an elegant solution to this, but just pointing it out.

@philomath213
Copy link
Contributor Author

Hi,
You are right python-pip is no longer available in recent Ubuntu distros since Python2 is EOL, replacing python-pip with python3-pip will resolve this issue.

Regarding "gophish" password, I didn't find any adequate solution to get the password other than displaying the log file after setting up "gophish".
We can also add another role that just runs "display log task", so after restarting gophish host, we can run it in order to get the log.

@glennzw
Copy link
Collaborator

glennzw commented Dec 23, 2021

Looks good to me, thanks!

Let's leave the password issue for now - if it crops up in the issues we can rethink it, but I do like your idea.

@glennzw glennzw merged commit 0646f14 into gophish:master Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants