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.