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

Display the invocation environment to aid debugging #1108

Merged
merged 1 commit into from Sep 7, 2018
Merged

Display the invocation environment to aid debugging #1108

merged 1 commit into from Sep 7, 2018

Conversation

davidemyers
Copy link
Contributor

This change adds a script that gets called from Ansible early on during a deployment to print out information intended be helpful when included by a user when reporting an issue. It attempts to detect the operating system and currentness of the Algo software, as well as display various Ansible variables.

Sample output when called from Ansible:

TASK [Gathering Facts] *************************************************************************************************
ok: [localhost]

--> Please include the following block of text when submitting issues:

Algo running on: Ubuntu 18.04.1 LTS
Created from git fork. Last commit: 4c70b71 Fix spacing in congrats message (#1104)
Python 2.7.15rc1
Runtime variables:
    algo_provider "digitalocean"
    algo_ondemand_cellular "False"
    algo_ondemand_wifi "True"
    algo_ondemand_wifi_exclude ""
    algo_local_dns "False"
    algo_ssh_tunneling "False"
    algo_windows "False"
    wireguard_enabled "True"
    dns_encryption "True"

TASK [Display the invocation environment] ******************************************************************************
changed: [localhost -> localhost]

Sample output when run directly:

Algo running on: Mac OS X 10.12.6
ZIP file created: Sep  2 15:26:06 2018
env/bin/python not found: has 'python -m virtualenv ...' been run?

I'm not very proficient with Ansible and may not have done everything properly. Please review for correctness.

Copy link
Collaborator

@jackivanov jackivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good idea, thanks!

@dguido dguido merged commit 65b0239 into trailofbits:master Sep 7, 2018
@davidemyers davidemyers deleted the showenv branch September 7, 2018 14:53
eyecat pushed a commit to eyecat/algo that referenced this pull request Oct 23, 2018
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.

None yet

3 participants