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

  tasks:

  - name: "set smtp information"
    inspur.sm.edit_smtp:
      interface: "eth0"
      email: "inspur@Inspur.com"
      primary_status: "enable"
      primary_ip: "100.2.2.2"
      primary_name: "inspur"
      primary_auth: "disable"
      provider: "{{ ism }}"

  - name: "set smtp information"
    inspur.sm.edit_smtp:
      interface: "eth0"
      email: "inspur@Inspur.com"
      primary_status: "enable"
      primary_ip: "100.2.2.2"
      primary_name: "inspur"
      primary_auth: "enable"
      primary_username: "test"
      primary_password: "123456"
      provider: "{{ ism }}"