[CORD-2950] Fix ansible 2.5.1 breakage by using union operator instead of iterating over docker image lists

Change-Id: I69c0795ae7a915cbdd9a970a0c2c7c3ba3d027a6
diff --git a/Makefile b/Makefile
index 8bab022..3becdbc 100644
--- a/Makefile
+++ b/Makefile
@@ -93,7 +93,7 @@
 
 $(CONFIG_FILES):
 	test -e "$(PODCONFIG_PATH)" || { echo "PODCONFIG file $(PODCONFIG_PATH) doesn't exist!" ; exit 1; }
-	ansible-playbook -i 'localhost,' --extra-vars="cord_podconfig='$(PODCONFIG_PATH)' genconfig_dir='$(GENCONFIG_D)' scenarios_dir='$(SCENARIOS_D)' platform_install_dir='$(PI)'" $(BUILD)/ansible/genconfig.yml $(LOGCMD)
+	ansible-playbook $(ANSIBLE_ARGS) -i 'localhost,' --extra-vars="cord_podconfig='$(PODCONFIG_PATH)' genconfig_dir='$(GENCONFIG_D)' scenarios_dir='$(SCENARIOS_D)' platform_install_dir='$(PI)'" $(BUILD)/ansible/genconfig.yml $(LOGCMD)
 
 printconfig:
 	@echo "Scenario: '$(SCENARIO)'"
diff --git a/ansible/genconfig.yml b/ansible/genconfig.yml
index 1e75e14..61c9417 100644
--- a/ansible/genconfig.yml
+++ b/ansible/genconfig.yml
@@ -87,14 +87,13 @@
 
     - name: Add items to profile_container_list from profile_manifest.xos_services
       set_fact:
-        profile_container_list: "{{ profile_container_list }} + [ 'xosproject/{{ item.name }}-synchronizer' ]"
-      with_items: "{{ profile_manifest.xos_services }}"
-      when: (not master_config.frontend_only) and (item.synchronizer is not defined or item.synchronizer)
+        profile_container_list: |
+          {{ profile_container_list | union(profile_manifest.xos_services | map(attribute='name') | map('regex_replace', '(.*)','xosproject/\1-synchronizer') | list) }}
 
     - name: Add items to profile_container_list from profile_manifest.enabled_gui_extensions
       set_fact:
-        profile_container_list: "{{ profile_container_list }} + [ 'xosproject/gui-extension-{{ item.name }}' ]"
-      with_items: "{{ profile_manifest.enabled_gui_extensions }}"
+        profile_container_list: |
+          {{ profile_container_list | union(profile_manifest.enabled_gui_extensions | map(attribute='name') | map('regex_replace', '(.*)','xosproject/gui-extension-\1') | list) }}
 
     - name: Update docker_image_whitelist to include containers specified by profile
       set_fact:
diff --git a/scenarios/local/config.yml b/scenarios/local/config.yml
index 993926f..6b8d514 100644
--- a/scenarios/local/config.yml
+++ b/scenarios/local/config.yml
@@ -49,6 +49,7 @@
   - "xosproject/xos-libraries"
   - "xosproject/xos-postgres"
   - "xosproject/xos-tosca"
+  - "xosproject/xos-synchronizer-base"
   - "xosproject/xos-ws"
   - "xosproject/chameleon"
   - "gliderlabs/consul-server"