diff --git a/image-builder/assets/playbooks/roles/osconfig/tasks/cloud-init.yaml b/image-builder/assets/playbooks/roles/osconfig/tasks/cloud-init.yaml index d50ee3b..be1c94c 100644 --- a/image-builder/assets/playbooks/roles/osconfig/tasks/cloud-init.yaml +++ b/image-builder/assets/playbooks/roles/osconfig/tasks/cloud-init.yaml @@ -10,3 +10,14 @@ systemd: masked: yes name: ssh.socket + +- name: "Cloud-Init | Ensuring cloud-init overrides directory exists" + file: + path: "/etc/systemd/system/cloud-init-local.service.d" + state: directory + mode: '0755' +- name: "Cloud-Init | Place cloud-init override file" + template: + src: cloud-init-local-overrides.j2 + dest: "/etc/systemd/system/cloud-init-local.service.d/override.conf" + mode: '0644' diff --git a/image-builder/assets/playbooks/roles/osconfig/templates/cloud-init-local-overrides.j2 b/image-builder/assets/playbooks/roles/osconfig/templates/cloud-init-local-overrides.j2 new file mode 100644 index 0000000..136383f --- /dev/null +++ b/image-builder/assets/playbooks/roles/osconfig/templates/cloud-init-local-overrides.j2 @@ -0,0 +1,2 @@ +[Service] +ExecStart=/bin/systemd-machine-id-setup