andsens / bootstrap-vz

Bootstrap Debian images for virtualized environments
http://bootstrap-vz.readthedocs.io/
Other
263 stars 145 forks source link

Fix cloud-init setup broken by pylint changes #479

Closed vmlintu-nosto closed 6 years ago

vmlintu-nosto commented 6 years ago

Commit 701678c9 changes print statements to print functions with end=' '. As the printed strings contain newlines, this causes a space to be written as the first character of the following line causing them to be indented.

An example config that is broken. Here disabling modules indents all the other lines of cloud.cfg except the first one causing the username name setting to fail as it expects indenting to be certain number of spaces.

plugins:
  cloud_init:
    metadata_sources: Ec2
    username: admin
    disable_modules:
      - locale
      - mounts

This commit removes the spaces by specifying end=''.

andsens commented 6 years ago

Good catch. Merging.
@CMeza99, could you check if your PR may have broken other things in the same way?