Cleanup cloud-init and change default cloud-init user

closes #71 (closed) #74 (closed)

This MR brings multiple changes toward cloud-init:

  • change the default_user builtin user for all flavors. This value is specified as input via a env vars of kanod, DIB_CLOUD_INIT_DEFAULT_USERNAME, and set by default to node-admin.
  • On Ubuntu:
    • Revert the external installation of upstream cloud-init to the one provided by the Ubuntu cloud repo.
    • Delete from element cis-remediation the node-admin user in cloud.cfg file because it's redundant with what the element kanod-cloud-init does here. Moreover the change in file /etc/sudoers.d/90-cloud-init-users is useless because it does not exist Vanilla and generated by cloud-init because default_user is defined by sudo: ["ALL=(ALL) NOPASSWD:ALL"].
  • On Opensuse:
    • Install the SuSE packages cloud-init and cloud-init-config-suse (repo main) to provide supported files
    • Patch the version of cloud-init-config-suse to a one supporting the SuSE OS (last one contain wrong content)
  • Minor fix for python3-pip which was installed in a bad way kanod-cloud-init element instead a correct one kanod-configure

Validated with ubuntu hardened, Opensuse plain and hardened using the default user node-admin.

Edited by Thomas Monguillon

Merge request reports

Loading