---
# Citrix ICA Client (Citrix Receiver)
- name: Clone citrix-receiver repo
  ansible.builtin.git:
    repo: 'https://aur.archlinux.org/icaclient.git'
    dest: '{{ executable_temp_dir }}/citrix-receiver'
- name: Install citrix-receiver with makepkg
  command: makepkg -si --noconfirm
  args:
    chdir: '{{ executable_temp_dir }}/citrix-receiver'
- name: Create INI client dir for citrix receiver
  file:
    state: directory
    path: '~/.ICAClient/cache'
- name: Copy INI Files to ICAClient so citrix receiver works
  ansible.builtin.copy:
    src: '/opt/Citrix/ICAClient/config/{{ item }}.ini'
    dest: '~/.ICAClient/{{ item }}.ini'
  loop:
    - All_Regions
    - Trusted_Region
    - Unknown_Region
    - canonicalization
    - regions
