- name: Copy ews configuration file
  ansible.builtin.template:
    src: ews.cfg
    dest: /data/ews/conf
    owner: root
    group: root
    mode: 0644

- name: Patching tpot.yml with custom ews configuration file
  ansible.builtin.lineinfile:
    path: /opt/tpot/etc/tpot.yml
    insertafter: "/opt/ewsposter/ews.ip"
    line: "     - /data/ews/conf/ews.cfg:/opt/ewsposter/ews.cfg"
