- name: Copy css files to {{ doc_root }}/common/css
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/css"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/css/*.css

- name: Copy js files to {{ doc_root }}/common/js
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/js"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/js/*.js

- name: Copy fonts files to {{ doc_root }}/common/fonts
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/fonts"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/fonts/*

- name: Copy html files to {{ doc_root }}/common/html
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/html"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/html/*

- name: Copy assets files to {{ doc_root }}/common/assets
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/assets"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/assets/*

# Copy all services, even if not permissioned elsewhere
- name: Copy services files to {{ doc_root }}/common/services
  copy:
    src: "{{ item }}"
    dest: "{{ doc_root }}/common/services"    # /library/www/html
    # owner: root
    # group: root
    # mode: '0644'
  with_fileglob:
    - html/services/*

- name: Symlink {{ doc_root }}/common/assets/iiab.ini -> {{ iiab_ini_file }}
  file:
    src: "{{ iiab_ini_file }}"    # /etc/iiab/iiab.ini
    path: "{{ doc_root }}/common/assets/iiab.ini"    # /library/www/html
    # owner: root
    # group: root
    state: link
