fixed a but where if virutal box is not supported on a deployment then the automation config script does not reference those lines
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 880617a..cd609fa 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -25,7 +25,7 @@
state: latest
force: yes
-- name: Docker Exposed vi TCP
+- name: Docker Exposed via TCP
become: yes
lineinfile:
dest=/etc/default/docker
diff --git a/roles/maas/tasks/main.yml b/roles/maas/tasks/main.yml
index c78cc4e..c28e33e 100644
--- a/roles/maas/tasks/main.yml
+++ b/roles/maas/tasks/main.yml
@@ -306,7 +306,6 @@
when: virtualbox_support is defined and virtualbox_host == ''
changed_when: false
-
- name: Custom Automation Compose Configurations
become: yes
template:
diff --git a/roles/maas/templates/automation-compose.yml.j2 b/roles/maas/templates/automation-compose.yml.j2
index 241214c..3b452df 100644
--- a/roles/maas/templates/automation-compose.yml.j2
+++ b/roles/maas/templates/automation-compose.yml.j2
@@ -44,10 +44,14 @@
- "GODEBUG=netdns=go"
- "AUTOMATION_PROVISION_URL=http://provisioner:4243/provision/"
- "AUTOMATION_PROVISION_TTL=30m"
+{% if virtualbox_support is defined %}
- "AUTOMATION_POWER_HELPER_SCRIPT=/etc/maas/virtualbox/power_discovery"
- "AUTOMATION_POWER_HELPER_USER={{ virtualbox.power_helper_user }}"
- "AUTOMATION_POWER_HELPER_HOST={{ virtualbox_host }}"
+{% endif %}
volumes:
- "/etc/maas:/mappings"
+{% if virtualbox_support is defined %}
- "/etc/maas/virtualbox:/etc/maas/virtualbox"
+{% endif %}
command: [ "-apiVersion", "1.0", "-apikey", "{{ apikey.stdout }}", "-maas", "http://{{ mgmt_ip_address.stdout }}/MAAS", "-period", "30s", "-mappings", "@/mappings/mappings.json", "-always-rename" ]