- name: create HTML report
  ansible.builtin.template:
    src: report.j2
    dest: "{{ file_path }}/linux.html"
  check_mode: no

- name: copy CSS over
  ansible.builtin.copy:
    src: "css"
    dest: "{{ file_path }}"
    directory_mode: true
  check_mode: no

- name: copy logos over
  ansible.builtin.copy:
    src: "{{ item }}" 
    dest: "{{ file_path }}"
    directory_mode: true
  loop:
    - "webpage_logo.png"
    - "redhat-ansible-logo.svg"
    - "server.png"
  check_mode: no

- name: display link to inventory report
  ansible.builtin.debug:
    msg: "Please go to http://{{ hostvars[report_server]['ansible_host'] }}/reports/linux.html"
