The first thing you’ll need to do is make sure you’ve run the keygen command to generate the keys:
-keygen -t ssh rsa
Then use this command to push the key to the remote server, modifying it to match your server name.
~/ cat ssh/id_rsa . pub | ssh user@hostname 'cat . >> . /authorized_keys' ssh
# vim hosts
==> [my_vm]
2 10.14.1.106
or
# ansible my_vm -m ping --user ubuntu
10.14.1.106 | success >> {
"changed": false,
"ping": "pong"
}
ansible my_vm --user=ubuntu -a "/bin/echo hello"
10.14.1.106 | success | rc=0 >>
hello
If the above steps work fine, we can follow this document to create an instance and check services on OpenStack. Here you go:
http://superuser.openstack.org/articles/using-ansible-for-continuous-integration-on-openstack
Reference:
http://docs.openstack.org/developer/openstack-ansible/install-guide/index.html
http://www.yet.org/2014/07/ansible/
http://rundeck.org/
No comments:
Post a Comment