# TODO add grass session hendling as var
#- name: Get JSON from the Interwebs                                                                          
#  uri: url="http://{{workstation_host}}" return_content=yes  
#  register: json_response
#  tags:
#    - orchard-frontend-accounting-init
#- name: register grass token
#  set_fact:
#    grass_token: "json_response.json.token"
#  tags:
#    - orchard-frontend-accounting-init
  
- name: copy application/configs
  template:
    src: "files/frontend_accounting_reserves/{{ item }}"
    dest: "{{ orchard_frontend_accounting_reserves_document_root }}/{{ item }}"
  with_items:
     - ".env"
  tags:
      - orchard-frontend-accounting-reserves-init
      - orchard-frontend-accounting-reserves-init-configs

#  TODO replace it with replace block
- name: copy server configs
  template:
    src: "files/frontend_accounting_reserves/lib/dev-server/{{ item }}"
    dest: "{{ orchard_frontend_accounting_reserves_document_root }}/lib/dev-server/{{ item }}"
  with_items:
     - "server.js"
  tags:
      - orchard-frontend-accounting-reserves-init
      - orchard-frontend-accounting-reserves-init-configs
