Closed dlehman closed 7 years ago
What's in your .netrc file?
Sorry to be an idiot-- how do I connect to Droplet at this point? Can't seem to ssh
in as algo
or root
...
You didn't set up a droplet. The install process failed because you have something weird in your netrc file that is screwing up headless SSH that Ansible needs.
Ah, OK, that makes sense. Thanks-- i'll remove my local .netrc and try again...
Yeah, worked fine now.
If anybody else (as me) had this issue, before removing the file (because I actually need it), set chmod to 600:
chmod 600 ~/.netrc
If that doesn't work, only then the content may be corrupted, so remove.
OS / Environment
macOS 10.12.3
Ansible version
ansible 2.2.1.0
Version of components from
requirements.txt
setuptools Version: 34.3.3 dopy Version: 0.3.5 boto Version: 2.46.1 boto3 Version: 1.4.4 azure Version: 2.0.0rc5 msrest Version: 0.4.1 apache-libcloud Version: 1.5.0 six Version: 1.10.0 pyOpenSSL Version: 16.2.0 Jinja2 Version: 2.8
Summary of the problem
Deploying to DigitalOcean At TASK [cloud-digitalocean : Get droplets] Error: fatal: [localhost]: FAILED! => {"changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: An unknown error occurred: ~/.netrc access too permissive: access permissions must restrict access to only the owner (/Users/dave/.netrc, line 3)", "redirected": false, "status": -1, "url": "https://api.digitalocean.com/v2/droplets?tag_name=Environment:Algo"}
Steps to reproduce the behavior
./algo
PLAY RECAP ***** localhost : ok=12 changed=5 unreachable=0 failed=1
The way of deployment (cloud or local)
local
Expected behavior
setup algo on VPS
Actual behavior
fails during setup
Full log
./algo
What provider would you like to use?
Enter the number of your desired provider : 1
Enter your API token (https://cloud.digitalocean.com/settings/api/tokens): [pasted values will not be displayed] : Name the vpn server: [algo.local]:
What region should the server be located in?
Do you want to enable VPN On Demand when connected to cellular networks?
Do you want to enable VPN On Demand when connected to Wi-Fi?
Do you want to exclude trusted Wi-Fi networks from using the VPN? (e.g., your home network. Comma-separated value, e.g., HomeNet,OfficeWifi,AlgoWiFi) :
Do you want to install a local DNS resolver to block ads while surfing?
Do you want each user to have their own account for SSH tunneling?
Do you want to apply operating system security enhancements on the server? (warning: replaces your sshd_config)
Do you want the VPN to support Windows 10 clients? (requires RSA certificates and key exchange, less secure)
Do you want to store the CA key? (required for update-users script, but less secure)
PLAY [Configure the server] ****
TASK [setup] *** ok: [localhost]
TASK [Generate the SSH private key] **** changed: [localhost -> localhost]
TASK [Generate the SSH public key] ***** ok: [localhost -> localhost]
TASK [Change mode for the SSH private key] ***** ok: [localhost -> localhost]
TASK [Ensure the dynamic inventory exists] ***** changed: [localhost]
TASK [cloud-digitalocean : Set the DigitalOcean Access Token fact] ***** ok: [localhost]
TASK [cloud-digitalocean : Delete the existing Algo SSH keys] ** ok: [localhost]
TASK [cloud-digitalocean : Upload the SSH key] ***** changed: [localhost]
TASK [cloud-digitalocean : Creating a droplet...] ** changed: [localhost]
TASK [cloud-digitalocean : Add the droplet to an inventory group] ** changed: [localhost]
TASK [cloud-digitalocean : set_fact] *** ok: [localhost]
TASK [cloud-digitalocean : Tag the groplet] **** ok: [localhost]
TASK [cloud-digitalocean : Get droplets] *** fatal: [localhost]: FAILED! => {"changed": false, "content": "", "failed": true, "msg": "Status code was not [200]: An unknown error occurred: ~/.netrc access too permissive: access permissions must restrict access to only the owner (/Users/dave/.netrc, line 3)", "redirected": false, "status": -1, "url": "https://api.digitalocean.com/v2/droplets?tag_name=Environment:Algo"}
PLAY RECAP ***** localhost : ok=12 changed=5 unreachable=0 failed=1