I think I have checked all the avaiable document/links to try to get my CDOT 9.4 Sim working with Ansible. I can't run any ansible command or playbook to NetApp.
My Netapp: CDOT 9.4 Sim or 9.1P6 (same issue)
My Ansible: I have copied all the netapp related file from /usr/lib/python2.7/site-packages/ansible to home/ansible/.ansible/plugins.
[ansible@hklsap14 netapp]$ ansible --version
ansible 2.6.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
I have create the ssh pairs so I can ssh to CDOT without issue:
[ansible@hklsap14 netapp]$ ssh 10.69.6.121 version
NetApp Release 9.4: Fri Jun 08 22:50:12 UTC 2018
See the Ansible error:'
[ansible@hklsap14 netapp]$ ansible -m na_ontap_svm -a "name=ansibleVServer root_volume=vol1 root_volume_aggregate=aggr0_sgfasdr101_01 root_volume_security_style=ntfs" netapp -vvv
ansible 2.6.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Using /etc/ansible/ansible.cfg as config file
Parsed /etc/ansible/hosts inventory source with ini plugin
META: ran handlers
<10.69.6.121> ESTABLISH SSH CONNECTION FOR USER: None
<10.69.6.121> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ansible/.ansible/cp/089fc91cf5 10.69.6.121 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<10.69.6.121> (255, '\x07\r\nError: "/bin/sh" is not a recognized command\r\n\r\n', '')
10.69.6.121 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: ",
"unreachable": true
}
[ansible@hklsap14 netapp]$ ansible-playbook main.yml -vvvv
ansible-playbook 2.6.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /bin/ansible-playbook
python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Using /etc/ansible/ansible.cfg as config file
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
ERROR! Syntax Error while loading YAML.
mapping values are not allowed in this context
The error appears to have been in '/home/ansible/script/playbook/netapp/main.yml': line 24, column 17, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
na_cdot_svm:
^ here