diff --git a/Vagrantfile b/Vagrantfile index b0b895f3..537b1156 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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] diff --git a/main.yml b/main.yml index bd3496c7..fa0d4743 100644 --- a/main.yml +++ b/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 diff --git a/schema/resources/docker.yml b/schema/resources/docker.yml index 68fd69a6..a5482666 100644 --- a/schema/resources/docker.yml +++ b/schema/resources/docker.yml @@ -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 diff --git a/tool/tool/service_handlers/__init__.py b/tool/tool/service_handlers/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tool/tool/service_handlers/base.py b/tool/tool/service_handlers/base.py deleted file mode 100644 index 38b9cfe8..00000000 --- a/tool/tool/service_handlers/base.py +++ /dev/null @@ -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?