# fl.yml signifies "file layout"

- name: Create 19 directories with ownership root:root and permissions 0755 (1 in /etc, 3 in {{ iiab_base }} and 15 in /library)    # iiab_base is /opt/iiab
  file:
    path: "{{ item }}"
    owner: root
    group: root
    mode: 0755
    state: directory
  with_items:
    - /etc/sysconfig/olpc-scripts/setup.d/installed/
    - "{{ yum_packages_dir }}"
    - "{{ pip_packages_dir }}"
    - "{{ downloads_dir }}"
    - /library/downloads/zims
    - /library/downloads/rachel
    - /library/downloads/maps
    - /library/working/zims
    - /library/working/rachel
    - /library/working/maps
    - "{{ iiab_zim_path }}/content"
    - "{{ iiab_zim_path }}/index"
    - "{{ doc_root }}/local_content"
    - "{{ doc_root }}/modules"
    - "{{ doc_root }}/common/css"
    - "{{ doc_root }}/common/js"
    - "{{ doc_root }}/common/fonts"
    - "{{ doc_root }}/common/html"
    - "{{ doc_root }}/common/images"
    - "{{ doc_root }}/common/assets"
    - "{{ doc_root }}/common/services"

- name: Symlink from {{ doc_root }}/common/webfonts to {{ doc_root }}/common/fonts
  file:
    src: "{{ doc_root }}/common/fonts"
    path: "{{ doc_root }}/common/webfonts"
    state: link
