---
- name: Include OS-specific variables
  include_vars: "{{ item }}"
  with_first_found:
    - "{{ ansible_os_family }}.yml"
    - "default.yml"

- name: Set banner file (non-Ubuntu)
  template:
    src: banner.j2
    dest: /etc/motd
    force: yes
  when: ansible_distribution != 'Ubuntu'

- name: Set banner file (Ubuntu)
  template:
    src: banner.j2
    dest: /etc/update-motd.d/00-header
    force: yes
  when: ansible_distribution == 'Ubuntu'

---
- name: Include OS-specific variables
  include_vars: "{{ item }}"
  with_first_found:
    - "{{ ansible_os_family }}.yml"
    - "default.yml"

- name: Set banner file (non-Ubuntu)
  template:
    src: banner.j2
    dest: /etc/motd
    force: yes
  when: ansible_distribution != 'Ubuntu'

- name: Set banner file (Ubuntu)
  template:
    src: banner-Ubuntu.j2
    dest: /etc/update-motd.d/00-header
    force: yes
  when: ansible_distribution == 'Ubuntu'

Fix banner generation for Ubuntu
Fix banner generation for Ubuntu

Change-Id: I0f4b659bd0a12eca7690128fd2e35dd0124459c4
