---

- name: Install initramfs script
  template:
    src: 'initramfs_message.j2'
    dest: '{{ initramfs_message_init_script_filepath }}'
    mode: '0750'
    owner: 'root'
    group: 'root'
    validate: 'sh %s'
  register: initramfs_message_register_init_script
  notify: [ 'Recreate initramfs' ]

- name: Get initramfs message
  command: '{{ initramfs_message_init_script_filepath }}'
  changed_when: False
  register: initramfs_message_register_init_script_output
  always_run: True
  when: initramfs_message_register_init_script|changed

- name: Show initramfs message during Ansible run (trailing newlines are not shown)
  debug:
    msg: '{{ initramfs_message_register_init_script_output.stdout_lines }}'
  when: initramfs_message_register_init_script|changed and (initramfs_message_debug|d() | bool)

---

- name: Install initramfs script
  template:
    src: 'initramfs_message.j2'
    dest: '{{ initramfs_message_init_script_filepath }}'
    mode: '0750'
    owner: 'root'
    group: 'root'
    validate: 'sh %s'
  register: initramfs_message_register_init_script
  notify: [ 'Recreate initramfs' ]

- name: Get initramfs message
  command: '{{ initramfs_message_init_script_filepath }}'
  changed_when: False
  register: initramfs_message_register_init_script_output
  when: initramfs_message_register_init_script|changed

- name: Show initramfs message during Ansible run (trailing newlines are not shown)
  debug:
    msg: '{{ initramfs_message_register_init_script_output.stdout_lines }}'
  when: initramfs_message_register_init_script|changed and (initramfs_message_debug|d() | bool)

Remove deprecated always_run which did not even work on first role run
Remove deprecated always_run which did not even work on first role run
