summaryrefslogtreecommitdiffstats
path: root/util/docker-compose/roles/machines/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'util/docker-compose/roles/machines/tasks')
-rwxr-xr-xutil/docker-compose/roles/machines/tasks/main.yml21
1 files changed, 21 insertions, 0 deletions
diff --git a/util/docker-compose/roles/machines/tasks/main.yml b/util/docker-compose/roles/machines/tasks/main.yml
new file mode 100755
index 00000000..365a9d90
--- /dev/null
+++ b/util/docker-compose/roles/machines/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+- name: create switch file if test mode enabled
+ template: src=switch_machines_file.j2
+ dest="{{ docker_compose_dir }}/switch_machines_file"
+ tags:
+ - redploy
+
+- name: docker cp switch_machines_file
+ shell: |
+ docker cp "{{ docker_compose_dir }}/switch_machines_file" \
+ compass-deck:/tmp/switch_machines_file
+ tags:
+ - redploy
+
+- name: inject switches and mac addresses
+ shell: |
+ docker exec compass-deck bash -c \
+ "/opt/compass/bin/manage_db.py set_switch_machines \
+ --switch_machines_file /tmp/switch_machines_file"
+ tags:
+ - redploy