Dear Team 

First i wish you good morning 

I am new engineer in ansible field, about linux i have good knowledge but i 
got project of ansible time complition is very short time. i am feeling too 
much happy with ansible feature. 
now i am sharing my issue which i am facing 

I have setup ansible in rhel7.2 IP 192.168.122.xxx, and i install 
server2008 r2 IP 192.168.122.xxx, i am able to ping each other but when i 
try to ping from ansible then i got error which mention bellow kindly look 


[root@ansible group_vars]# cat windows.yml 
ansible_ssh_user=Administrator
ansible_ssh_pass=redhat@123
ansible_ssh_port=5985
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore

-------------------------------------------------------------------------------------------------------------------------
[root@ansible group_vars]# ansible windows -i /etc/ansible/hosts -m 
win_ping -vvv
Using /etc/ansible/ansible.cfg as config file
*ERROR! Unexpected Exception: dictionary update sequence element #0 has 
length 1; 2 is required*
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible", line 103, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/adhoc.py", line 131, 
in run
    inventory = Inventory(loader=loader, variable_manager=variable_manager, 
host_list=self.options.inventory)
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 97, in __init__
    self.parse_inventory(host_list)
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 164, in parse_inventory
    group.vars = combine_vars(group.vars, 
self.get_group_variables(group.name))
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 554, in get_group_variables
    self._vars_per_group[groupname] = self._get_group_variables(groupname, 
vault_password=vault_password)
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 572, in _get_group_variables
    vars = combine_vars(vars, self.get_group_vars(group))
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 774, in get_group_vars
    return self._get_hostgroup_vars(host=None, group=group, 
new_pb_basedir=new_pb_basedir, return_results=return_results)
  File "/usr/lib/python2.7/site-packages/ansible/inventory/__init__.py", 
line 835, in _get_hostgroup_vars
    host_results = self._variable_manager.add_group_vars_file(base_path, 
self._loader)
  File "/usr/lib/python2.7/site-packages/ansible/vars/__init__.py", line 
615, in add_group_vars_file
    data = self._load_inventory_file(path, loader)
  File "/usr/lib/python2.7/site-packages/ansible/vars/__init__.py", line 
573, in _load_inventory_file
    rval.update(data)
ValueError: dictionary update sequence element #0 has length 1; 2 is 
required

 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6ead99cb-83d9-4bf6-b9aa-d849c3b9d7fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to