When userdata was provided, the code generated an incorrect configuration file containing duplicate headers, which may cause cloud-init parsing to fail or not work as expected. Story: 2011309 Task: 51454 Change-Id: I35284f2ede9cda225f8aefff651702405ccfefff