- name: Connect media test
  hosts: ism
  connection: local
  gather_facts: no
  vars:
    ism:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Set remote image redirection"
    inspur.sm.edit_connect_media:
      image_type: "CD"
      op_type: "start"
      image_name: "aa.iso"
      provider: "{{ ism }}"