Hi Randy,

You may want to use a layer like Vagrant to simplify this initial setup. I 
use the vagrant-digitalocean plugin which interacts with the DO API to 
create droplets and returns ip info for the droplets (even sets up 
private(ish) IPs) - you can then run Ansible from within or outside Vagrant 
and ideally interact with something to track the IPs/hosts (HostDB maybe, 
or just a bastion host). You also get the sideeffect of being able to 
provision the same config against VBox, VMware from the same interface for 
testing/offline dev purposes.

On Saturday, February 1, 2014 6:04:24 PM UTC-5, Randy Kahle wrote:
>
> I have adopted an approach of having a separate bootstrap phase which 
> sets up SSH on a non standard port, adds core accounts, some other 
> tasks, and finally reboots the compute instance. 
>
> I am using this with Digital Ocean. When I create a compute instance 
> they send me an email with the IP address and root password. 
>
> My current approach is not scalable as I can only run the bootstrap for 
> a single compute instance at a time, as you can see from the script file 
> I have "--ask-pass", which requires me to enter the provided root 
> password at run time. 
>
> Is it possible to have a hosts file with the following: 
>
> [bootstrap] 
> 107.170.2.181 hostname=memsql01 password=llfdkjsd9837 
> 124.221.33.181 hostname=memsql02 password=99irekfiewl 
>
> and have the provided password used for the paramiko connection during 
> this phase? 
>
> Thank you... 
>
> -- Randy 
>
>
>
>
>
> ...... Files Below ..... 
>
>
> ===== 
> #!/bin/sh 
>
> # Script to run the bootstrap playbook 
>
> ansible-playbook bootstrap.yml -u root --ask-pass -c paramiko 
> ===== 
>
> My bootstrap.yml: 
>
> ====== 
> --- 
> # Bootstrap compute instances into a standard base state 
>
>   - hosts: bootstrap 
>     user:  root 
>     vars: 
>
>
>     roles: 
>      - bootstrap 
>      - users 
>      - reboot 
> ===== 
>
> And a portion of my hosts file: 
>
> ===== 
> [bootstrap] 
> 107.170.2.181 hostname=memsql01 
> ===== 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to