#ansible error IP does not appear to be ipv4...

1 messages · Page 1 of 1 (latest)

tall fiber
#

when I run my playbook. I get this. I am not understanding what its barking over

TASK [Gather facts] ********************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: "'10.1.2.3'" does not appear to be an IPv4 or IPv6 address

I am just trying to setup connection to my netapp clusters for the first time and am struggling a bit..

mossy rivet
#

It looks loke there are some extra quotes around the IP. Try removing those

tall fiber
# mossy rivet It looks loke there are some extra quotes around the IP. Try removing those

Hi that is the weird thing. I seen that but I do not know why or where it is thinking that is. here is my playbook and vars.


  • hosts: localhost
    name: Setup ONTAP
    gather_facts: false
    vars_files:
    • nvar.yml
      collections:
    • netapp.ontap
      tasks:
    • name: Gather facts
      na_ontap_info:
      state: info
      gather_subset: volume_info
      hostname: "{{ hostname }}"
      vserver: "{{ vserver }}"
      username: "{{ username }}"
      password: "{{ password }}"
      https: true
      validate_certs: false
      register: netapp_info
    • debug:
      msg: "{{ netapp_info.ontap_info.volume_info[item].volume_id_attributes.name }}"
      loop: "{{ netapp_info.ontap_info.volume_info|list }}"

hostname:

  • 10.1.2.3
    username:
  • admin
    password:
  • wishiknewwhatiwasdoing!!
    vserver:
  • vserver1

not sure if it needed to be quoted like a string, tried that too, so does not work.

~

not sure if it needed to be quoted like a string, tried that too, so does not work.

~

drowsy plume
#

If you copy/pasted from a website like netapp.io it could have hidden characters. You could also try entering the values/settings directly in the playbook instead of from the vars file and see if it works. The IP address doesn't need to be in quotes but it really doesn't matter either way.