diff --git a/ansible/roles/kolla-bifrost/tasks/main.yml b/ansible/roles/kolla-bifrost/tasks/main.yml
index a455048ffd2e68937b121713a2af9c3c7cce4ae9..ab8f1417b47fc8fd9dfe0d79396b677ee3e91732 100644
--- a/ansible/roles/kolla-bifrost/tasks/main.yml
+++ b/ansible/roles/kolla-bifrost/tasks/main.yml
@@ -9,6 +9,7 @@
   merge_yaml:
     sources: "{{ kolla_bifrost_config_paths | product(['/kolla/config/bifrost/' ~ item]) | map('join') | list }}"
     dest: "{{ kolla_node_custom_config_path }}/bifrost/{{ item }}"
+    yaml_width: 131072
     mode: 0640
   with_items:
     - bifrost.yml
diff --git a/ansible/roles/kolla-bifrost/templates/kolla/config/bifrost/dib.yml b/ansible/roles/kolla-bifrost/templates/kolla/config/bifrost/dib.yml
index a4fe0522b6b28e1653fe31f0a27a9ad7c933c1f1..b4d2b80dd5bd8127411e5efde1a367775886ec0b 100644
--- a/ansible/roles/kolla-bifrost/templates/kolla/config/bifrost/dib.yml
+++ b/ansible/roles/kolla-bifrost/templates/kolla/config/bifrost/dib.yml
@@ -10,7 +10,7 @@ dib_os_release: "{{ kolla_bifrost_dib_os_release }}"
 dib_elements: "{{ (kolla_bifrost_dib_elements + [kolla_bifrost_dib_init_element]) | join(' ') }}"
 
 # DIB image environment variables.
-{{ {'dib_env_vars': kolla_bifrost_dib_env_vars} | to_nice_yaml }}
+{{ {'dib_env_vars': kolla_bifrost_dib_env_vars} | to_nice_yaml(width=131072) }}
 
 # List of DIB image packages.
 dib_packages: "{{ kolla_bifrost_dib_packages | join(',') }}"
diff --git a/kayobe/plugins/action/merge_yaml.py b/kayobe/plugins/action/merge_yaml.py
index 0655478c535327279f14b6f94e6e4cfd62e5c70d..73f954832404d7fb21c5b95f6766e43bf67006fb 100644
--- a/kayobe/plugins/action/merge_yaml.py
+++ b/kayobe/plugins/action/merge_yaml.py
@@ -59,6 +59,14 @@ options:
     default: False
     required: False
     type: bool
+  yaml_width:
+    description:
+      - The maximum width of the YAML document. By default, Ansible uses the
+        PyYAML library which has a default 80 symbol string length limit.
+        To change the limit, the new value can be used here.
+    default: None
+    required: False
+    type: int
 author: Sean Mooney
 '''
 
@@ -72,6 +80,7 @@ Merge multiple yaml files:
         sources:
           - "/tmp/default.yml"
           - "/tmp/override.yml"
+        yaml_width: 131072
         dest:
           - "/tmp/out.yml"
 '''
@@ -117,6 +126,7 @@ class ActionModule(action.ActionBase):
         output = {}
         sources = self._task.args.get('sources', None)
         extend_lists = self._task.args.get('extend_lists', False)
+        yaml_width = self._task.args.get('yaml_width', None)
         if not isinstance(sources, list):
             sources = [sources]
         for source in sources:
@@ -131,11 +141,13 @@ class ActionModule(action.ActionBase):
         try:
             result_file = os.path.join(local_tempdir, 'source')
             with open(result_file, 'w') as f:
-                f.write(yaml.dump(output, default_flow_style=False))
+                f.write(yaml.dump(output, default_flow_style=False,
+                                  width=yaml_width))
 
             new_task = self._task.copy()
             new_task.args.pop('sources', None)
             new_task.args.pop('extend_lists', None)
+            new_task.args.pop('yaml_width', None)
             new_task.args.update(
                 dict(
                     src=result_file