mwiget / hetzner-ansible

My first steps learning Ansible to set up a root server hosted by Hetzner GmbH in Germany
Apache License 2.0
24 stars 7 forks source link

Unauthorized #1

Open axelsegebrecht opened 7 years ago

axelsegebrecht commented 7 years ago

When running listmyservers.sh and showmykeys.sh, both scripts produce a 401 error (unauthorized).

I have successfully created host and secret.yml files after running create-password-hash.sh, using the Hetzner Robot's Webservice username and password.

I am running on Mac OS 10.12.3, Python 2.7.13 and ansible 2.2.0.0.

Thank you for putting this repo on github and sharing 👍

axelsegebrecht commented 7 years ago

I have tried generating the password hash differently, as per a Stackoverflow suggestion, and am getting the same results.

(via github ansible issue) python -c "from passlib.hash import sha512_crypt; print sha512_crypt.encrypt('%WEBSERVICEPASS%', rounds=5000)"

(compared to create-password.sh) python -c "from passlib.hash import sha512_crypt; import getpass; print sha512_crypt.encrypt(getpass.getpass())"

mwiget commented 7 years ago

Well, these scripts simply extract whatever webservice username and password are set in secfrets.yml. A password must be set for your webservice username via Hetzners robot interface. See https://wiki.hetzner.de/index.php/Robot_Webservice/en. The URL to set the password is on: https://robot.your-server.de/preferences