Skip to content

Instantly share code, notes, and snippets.

@devvesa
Created February 27, 2014 16:59
Show Gist options
  • Save devvesa/9254287 to your computer and use it in GitHub Desktop.
Save devvesa/9254287 to your computer and use it in GitHub Desktop.
Ansible cookbooks for devstack
[ssh_connection]
ssh_args=-o ForwardAgent=yes
---
- hosts: devstack
user: ubuntu
sudo: True
tasks:
- name: set the nameserver
copy: src=./templates/resolv.conf dest=/etc/resolv.conf
- name: update the system
apt: update_cache=yes upgrade=yes
- name: reconfigure locales
command: dpkg-reconfigure locales
- name: reboot the servers
command: /sbin/reboot
- name: wait for the host to be rebooted
local_action: wait_for host=cleanmidostack.midocloud port=22 delay=5
- name: install git
apt: pkg=git
- hosts: devstack
user: ubuntu
sudo: False
tasks:
- name: copy ssh key for github
copy: src={{github_key}} dest=~/.ssh/github_key
- name: copy the ssh config file
copy: src=./templates/ssh_config dest=~/.ssh/config
- name: clone midostack
git: [email protected]:midokura/midostack dest=~/midostack
nameserver 8.8.8.8
Host github.com
IdentityFile ~/.ssh/github_key
StrictHostKeyChecking no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment