Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker scheduler #10

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
name: rexray
state: restarted
when: rexray_service

- name: restart docker
systemd:
name: docker
state: restarted
13 changes: 13 additions & 0 deletions tasks/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

- name: Create Docker plug-ins folder
file:
path: /etc/docker/plug-ins
state: directory

- name: Add docker config file
template:
src: docker.spec.j2
dest: /etc/docker/plug-ins/rexray.spec
notify:
- restart docker
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
name: rexray
state: started
when: rexray_service

- include: docker.yml
when: rexray_docker is defined
5 changes: 5 additions & 0 deletions templates/config.yml.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# {{ ansible_managed }}
rexray:
{% if rexray_docker is defined %}
modules:
default-docker:
host: tcp://:7981
{% endif %}
logLevel: {{ rexray_log_level }}
libstorage:
service: {{ rexray_storage_drivers[0] }}
Expand Down
1 change: 1 addition & 0 deletions templates/docker.spec.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tcp://{{ ansible_default_ipv4.address }}:7981
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@ rexray_vbox_tls: false
rexray_vbox_volume_path: ''
rexray_vbox_controller_name: SATA
#rexray_vbox_machine: ''

# Docker
rexray_docker: false