---
  - name: Create exemONE Agent Directory
    ansible.builtin.file:
      path: "{{ EXEM_HOME }}"
      state: directory
      mode: '0755'

  - name: Copy exemONE Container-Agent File
#    ansible.posix.synchronize:    
    ansible.builtin.copy:
      src: "{{ role_path }}/files/container"
      dest: "{{ EXEM_HOME }}"

  - name: Create Agent Script
    ansible.builtin.template:
      src: "{{ item }}.j2"
      dest: "{{ EXEM_HOME }}/container/script/binary_mode/{{ item }}"
      mode: '0755'
    with_items: 
      - start.sh
      - stop.sh

  - name: exem-container-agent start
    ansible.builtin.shell: "nohup {{ EXEM_HOME }}/container/script/binary_mode/start.sh"
