trailofbits / algo

Set up a personal VPN in the cloud
https://blog.trailofbits.com/2016/12/12/meet-algo-the-vpn-that-works/
GNU Affero General Public License v3.0
28.93k stars 2.32k forks source link

Encountered Error on TASK [setup] #758

Closed ajwagner777 closed 6 years ago

ajwagner777 commented 6 years ago

OS / Environment

macOS 10.13.1

Ansible version

ansible 2.2.0.0

Version of components from requirements.txt

Name: msrestazure
Version: 0.4.19
Summary: AutoRest swagger generator Python client runtime. Azure-specific module.
Home-page: https://github.com/Azure/msrestazure-for-python
Author: Microsoft Corporation
Author-email: azpysdkhelp@microsoft.com
License: MIT License
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: adal, msrest, keyring
---
Name: setuptools
Version: 38.2.4
Summary: Easily download, build, install, upgrade, and uninstall Python packages
Home-page: https://github.com/pypa/setuptools
Author: Python Packaging Authority
Author-email: distutils-sig@python.org
License: UNKNOWN
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: 
---
Name: ansible
Version: 2.2.0.0
Summary: Radically simple IT automation
Home-page: http://ansible.com/
Author: Ansible, Inc.
Author-email: info@ansible.com
License: GPLv3
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: pycrypto, paramiko, setuptools, jinja2, PyYAML
---
Name: dopy
Version: 0.3.5
Summary: Python client for the Digital Ocean API
Home-page: https://github.com/devo-ps/dopy
Author: Vincent Viallet
Author-email: vincent@devo.ps
License: The MIT License (MIT)
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: requests
---
Name: boto
Version: 2.48.0
Summary: Amazon Web Services Library
Home-page: https://github.com/boto/boto/
Author: Mitch Garnaat
Author-email: mitch@garnaat.com
License: MIT
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: 
---
Name: boto3
Version: 1.5.3
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: UNKNOWN
License: Apache License 2.0
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: s3transfer, jmespath, botocore
---
Name: azure
Version: 2.0.0rc5
Summary: Microsoft Azure Client Libraries for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: ptvshelp@microsoft.com
License: MIT License
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: azure-mgmt, azure-servicebus, azure-servicemanagement-legacy, azure-storage, azure-graphrbac, azure-batch
---
Name: msrest
Version: 0.4.1
Summary: AutoRest swagger generator Python client runtime.
Home-page: https://github.com/xingwu1/autorest/tree/python/ClientRuntimes/Python/msrest
Author: Microsoft Corporation
Author-email: UNKNOWN
License: MIT License
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: isodate, requests, requests-oauthlib, chardet, certifi, enum34, keyring
---
Name: six
Version: 1.11.0
Summary: Python 2 and 3 compatibility utilities
Home-page: http://pypi.python.org/pypi/six/
Author: Benjamin Peterson
Author-email: benjamin@python.org
License: MIT
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: 
---
Name: pyOpenSSL
Version: 17.5.0
Summary: Python wrapper module around the OpenSSL library
Home-page: https://pyopenssl.org/
Author: Hynek Schlawack
Author-email: hs@ox.cx
License: Apache License, Version 2.0
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: cryptography, six
---
Name: Jinja2
Version: 2.8
Summary: A small but fast and easy to use stand-alone template engine written in pure python.
Home-page: http://jinja.pocoo.org/
Author: Armin Ronacher
Author-email: armin.ronacher@active-4.com
License: BSD
Location: /Users/aaronwagner/Development/algo/env/lib/python2.7/site-packages
Requires: MarkupSafe

Summary of the problem

Unable to deploy to Digital Ocean, Amazon EC2 and Existing ubuntu machine. Hit an error at: fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/ohai", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}

Steps to reproduce the behavior

run ./algo

The way of deployment (cloud or local)

cloud

Expected behavior

Creates algo VPN server on Digital Ocean

Actual behavior

Error noted above. Happened with every cloud provider attempted.

Full log

(env) Aarons-MacBook-Pro:algo aaronwagner$ ./algo

  What provider would you like to use?
    1. DigitalOcean
    2. Amazon EC2
    3. Microsoft Azure
    4. Google Compute Engine
    5. Install to existing Ubuntu 16.04 server

Enter the number of your desired provider
: 1

Enter your API token. The token must have read and write permissions (https://cloud.digitalocean.com/settings/api/tokens):
[pasted values will not be displayed]
: 

Name the vpn server:
[algo.local]: algo.wagner.digocn

  What region should the server be located in?
    1.  Amsterdam        (Datacenter 2)
    2.  Amsterdam        (Datacenter 3)
    3.  Frankfurt
    4.  London
    5.  New York         (Datacenter 1)
    6.  New York         (Datacenter 2)
    7.  New York         (Datacenter 3)
    8.  San Francisco    (Datacenter 1)
    9.  San Francisco    (Datacenter 2)
    10. Singapore
    11. Toronto
    12. Bangalore
Enter the number of your desired region:
[7]: 9

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to cellular networks?
[y/N]: y

Do you want macOS/iOS clients to enable "VPN On Demand" when connected to Wi-Fi?
[y/N]: y

List the names of trusted Wi-Fi networks (if any) that macOS/iOS clients exclude from using the VPN (e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi)
: ********

Do you want to install a DNS resolver on this VPN server, to block ads while surfing?
[y/N]: y

Do you want each user to have their own account for SSH tunneling?
[y/N]: y

Do you want to apply operating system security enhancements on the server? (warning: replaces your sshd_config)
[y/N]: y

Do you want the VPN to support Windows 10 or Linux Desktop clients? (enables compatible ciphers and key exchange, less secure)
[y/N]: n

Do you want to retain the CA key? (required to add users in the future, but less secure)
[y/N]: y

PLAY [Configure the server] ****************************************************

TASK [setup] *******************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/local/bin/ohai", "failed": true, "msg": "[Errno 2] No such file or directory", "rc": 2}

PLAY RECAP *********************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1 
cgm616 commented 6 years ago

Duplicate of #752?

ajwagner777 commented 6 years ago

Not exactly the same presentation, and /usr/sbin is in my path.

dguido commented 6 years ago

There's no instance of "/usr/local/bin/ohai" in the source code for this project. Did you modify Algo in some way to cause this? This appears to be a non-standard installation.

ajwagner777 commented 6 years ago

@dguido literally followed instructions from the readme.

dguido commented 6 years ago

You modified something on your local computer that has inserted new code into the installation process then. I can’t debug this. Please checkout the code and try again.