Closed wch closed 9 years ago
There's no way to record that information on the droplet. The plan is to make cloud_config
the default, and then change the default user to analogsea
.
You can get it when you're logged into droplet, using the metadata API: https://developers.digitalocean.com/metadata/#user-data
For example:
analogsea@revdep:~$ curl http://169.254.169.254/metadata/v1/user-data
#cloud-config
users:
- name: analogsea
sudo: ALL=(ALL) NOPASSWD:ALL
groups: sudo
shell: /bin/bash
....
... but of course the problem with ssh'ing in and running this query is that you need to know who to ssh in as first.
When a droplet is created with
cloud_config='ubuntu'
, you can only log in as user analogsea, not root.I think the droplet object should record this user and use it by default.
Edit: in order for
droplets()
ordroplet()
to return this information, we'll need to retrieve theuser-data
metadata: https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata