Anderson, Craig (ca846m) 7a99dea948 Properly handle machine-ids
/etc/machind-id needed to be removed from the image for cloud-init to
generate it, no simply blank.

/var/lib/dbus/machine-id needed to be symlinked to /etc/machine-id,
otherwise dbus was storing its ID into the generic image. Some NIC
drivers use this for generating unique MAC addresses, so duplicating
these IDs could cause duplicate MAC addressing.

Also correct spelling of "finalize".

Change-Id: Iaabd0730c4e6d2ae47e5ff1c25adc1b6eb65533b
2021-04-07 12:06:48 -07:00

29 lines
597 B
YAML

- name: "MOTD | Set Login Prompt"
copy:
content: "{{ banners.login }}\n"
dest: "/etc/issue"
owner: root
group: root
mode: '0644'
- name: "Finalize | Reset MOTD"
file:
state: "{{ item }}"
path: "/etc/update-motd.d/"
owner: root
group: root
mode: '0755'
loop:
- absent
- directory
- name: "Finalize | Remove MOTD News config"
file:
state: "absent"
path: "/etc/default/motd-news"
- name: "MOTD | Set MOTD"
copy:
content: "{{ banners.motd }}"
dest: "/etc/update-motd.d/00-motd"
owner: root
group: root
mode: '0755'