---
- name: Copy license file to Management Servers
  copy:
    src: '{{ apigee_license_path }}'
    dest: '{{ apigee_tmp_dir }}/license.txt'
    owner: apigee
    group: apigee
    mode: 0600
  when: "'ms' in apigee.profiles or 'sa' in apigee.profiles or 'aio' in apigee.profiles"

---
- name: Copy license file to Management Servers
  copy:
    src: '{{ apigee_license_path }}'
    dest: '{{ apigee_tmp_dir }}/license.txt'
    owner: apigee
    group: apigee
    mode: 0600
  when: apigee.profiles | intersect(('ms', 'sa', 'aio'))

Clarify conditional check for management server profiles
Clarify conditional check for management server profiles
