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

  tasks:

  - name: "set ipv4 information"
    inspur.sm.edit_ipv4:
      interface_name: "eth0"
      ipv4_status: "disable"
      provider: "{{ ism }}"

  - name: "set ipv4 information"
    inspur.sm.edit_ipv4:
      interface_name: "eth0"
      ipv4_status: "enable"
      ipv4_dhcp_enable: "dhcp"
      provider: "{{ ism }}"
      
  - name: "set ipv4 information"
    inspur.sm.edit_ipv4:
      interface_name: "eth0"
      ipv4_status: "enable"
      ipv4_dhcp_enable: "static"
      ipv4_address: "100.2.36.10"
      ipv4_subnet: "255.255.255.0"
      ipv4_gateway: "100.2.36.1"
      provider: "{{ ism }}"