Merge pull request #3 from xarses/vagrant
Change Vagrantfile to use debian jessie
This commit is contained in:
commit
e13b3249f9
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -6,7 +6,7 @@ VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
|
||||
config.vm.box = "utopic"
|
||||
config.vm.box = "thoughtbot/debian-jessie-64"
|
||||
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
v.customize ["modifyvm", :id, "--memory", 2048]
|
||||
|
14
main.yml
14
main.yml
@ -6,14 +6,6 @@
|
||||
- shell: docker --version
|
||||
ignore_errors: true
|
||||
register: docker_version
|
||||
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
|
||||
when: docker_version|failed
|
||||
- shell: docker pull ubuntu
|
||||
- shell: apt-get install -y python-pip
|
||||
- shell: pip install -y {{item}}
|
||||
with_items:
|
||||
- keystoneclient
|
||||
- novaclient
|
||||
- glanceclient
|
||||
- include: compose.yml
|
||||
- include: openstack.yml
|
||||
- shell: curl -sSL https://get.docker.com/ | sudo sh
|
||||
when: docker_version | failed
|
||||
- shell: docker pull debian:jessie
|
||||
|
@ -5,30 +5,23 @@
|
||||
|
||||
id: docker
|
||||
type: resource
|
||||
handler: playbook
|
||||
handler: ansible
|
||||
version: v1
|
||||
run:
|
||||
# all of this should be moved to regular ansible playbook
|
||||
# we need to reuse as much as possible of ansible goodness
|
||||
- shell: docker --version
|
||||
ignore_errors: true
|
||||
register: docker_version
|
||||
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
|
||||
when: docker_version|failed
|
||||
- shell: docker pull ubuntu
|
||||
- shell: apt-get install -y python-pip
|
||||
- shell: pip install -y {{item}}
|
||||
with_items: docker.openstack_clients
|
||||
- shell: docker-compose --version
|
||||
register: compose
|
||||
ignore_errors: true
|
||||
- shell: curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
|
||||
when: compose|failed
|
||||
- shell: chmod +x /usr/local/bin/docker-compose
|
||||
parameters:
|
||||
openstack_clients:
|
||||
default:
|
||||
- keystoneclient
|
||||
- novaclient
|
||||
- glanceclient
|
||||
required: true
|
||||
actions:
|
||||
run:
|
||||
- hosts: [docker]
|
||||
sudo: yes
|
||||
tasks:
|
||||
# all of this should be moved to regular ansible playbook
|
||||
# we need to reuse as much as possible of ansible goodness
|
||||
- shell: docker --version
|
||||
ignore_errors: true
|
||||
register: docker_version
|
||||
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
|
||||
when: docker_version|failed
|
||||
- shell: docker pull debian:jessie
|
||||
remove:
|
||||
- hosts: [docker]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- shell: apt-get remove -y docker
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
|
||||
class BaseService(object):
|
||||
|
||||
def __init__(self, resources, hosts='all'):
|
||||
self.hosts = hosts
|
||||
self.resources = resources
|
||||
|
||||
def run(self):
|
||||
for resource in self.resources:
|
||||
yield resource.run()
|
||||
|
||||
# how service should be different from resources, apart from providing
|
||||
# additional data?
|
Loading…
x
Reference in New Issue
Block a user