# Trouble in using netscaler module of ansible

**URL:** <https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162>\
**Category:** Ansible Developer\
**Created:** [December 2, 2016, 9:18am UTC](https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162 "2016-12-02T09:18:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chitrangda\_Kapoor](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@Chitrangda\_Kapoor](https://forum.ansible.com/u/Chitrangda_Kapoor)\
**Post date:** [December 2, 2016, 9:18am UTC](https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162/1 "2016-12-02T09:18:44Z")

</div>

Hi,

I am trying to use netscaler module of ansible like below:-

“ansible host -m netscaler -a “nsc\_host=10.102.56.141 user=nsroot password=nsroot””

But I am getting the below error:-

‘ERROR! Specified hosts and/or --limit does not match any hosts’

Even with -vvv ,I get the following:-

“[root@localhost roles]# ansible host -m netscaler -a “nsc\_host=10.102.56.141 user=nsroot password=nsroot” -vvv  
Using /etc/ansible/ansible.cfg as config file  
ERROR! Specified hosts and/or --limit does not match any hosts”

Can anybody help me how to connect to netscaler with ansible. The ansible ping gives following error:-

“[root@localhost roles]# ansible 10.102.56.143 -m ping -vvv  
Using /etc/ansible/ansible.cfg as config file  
\<10.102.56.143\> ESTABLISH SSH CONNECTION FOR USER: None  
\<10.102.56.143\> SSH: EXEC ssh -C -q -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=/root/.ansible/cp/ansible-ssh-%h-%p-%r 10.102.56.143 '/bin/sh -c '”‘"’( umask 77 && mkdir -p “`echo /tmp/ansible/$USER/ansible-tmp-1480696563.27-207661911591794`” && echo ansible-tmp-1480696563.27-207661911591794=“`echo /tmp/ansible/$USER/ansible-tmp-1480696563.27-207661911591794`” ) && sleep 0’“'”‘’  
10.102.56.143 | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “Failed to connect to the host via ssh.”,  
“unreachable”: true  
}  
"

---

<div class="post-metadata">

**Author:** ![Chitrangda\_Kapoor](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@Chitrangda\_Kapoor](https://forum.ansible.com/u/Chitrangda_Kapoor)\
**Post date:** [December 7, 2016, 8:28am UTC](https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162/2 "2016-12-07T08:28:04Z")

</div>

Hi Can someone please help me with this?

---

<div class="post-metadata">

**Author:** ![Serge\_van\_Ginderacht](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Serge\_van\_Ginderacht](https://forum.ansible.com/u/Serge_van_Ginderacht)\
**Post date:** [December 7, 2016, 8:50am UTC](https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162/3 "2016-12-07T08:50:39Z")

</div>

Can you try

ansible **localhost** -m netscaler -a “nsc\_host=10.102.56.141 user=nsroot password=nsroot” -vvv

​Serge​

---

<div class="post-metadata">

**Author:** ![Chitrangda\_Kapoor](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@Chitrangda\_Kapoor](https://forum.ansible.com/u/Chitrangda_Kapoor)\
**Post date:** [December 7, 2016, 3:29pm UTC](https://forum.ansible.com/t/trouble-in-using-netscaler-module-of-ansible/23162/4 "2016-12-07T15:29:54Z")

</div>

Hi Serge,

I tried the following:-

[root@localhost ~]# ansible localhost -m netscaler -a “nsc\_host=10.102.56.141 user=nsroot password=nsroot” -vvv  
Using /etc/ansible/ansible.cfg as config file  
\<127.0.0.1\> ESTABLISH LOCAL CONNECTION FOR USER: root  
\<127.0.0.1\> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo /tmp/ansible/$USER/ansible-tmp-1481150804.2-134977495866272`” && echo ansible-tmp-1481150804.2-134977495866272=“`echo /tmp/ansible/$USER/ansible-tmp-1481150804.2-134977495866272`” ) && sleep 0’  
\<127.0.0.1\> PUT /tmp/tmp8MRvit TO /tmp/ansible/root/ansible-tmp-1481150804.2-134977495866272/netscaler  
\<127.0.0.1\> EXEC /bin/sh -c ‘LANG=C LC\_ALL=C LC\_MESSAGES=C /usr/bin/python /tmp/ansible/root/ansible-tmp-1481150804.2-134977495866272/netscaler; rm -rf “/tmp/ansible/root/ansible-tmp-1481150804.2-134977495866272/” \> /dev/null 2\>&1 && sleep 0’  
localhost | FAILED! =\> {  
“changed”: false,  
“failed”: true,  
“invocation”: {  
“module\_args”: {  
“action”: “enable”,  
“name”: “localhost.localdomain”,  
“nsc\_host”: “10.102.56.141”,  
“nsc\_protocol”: “https”,  
“password”: “nsroot”,  
“type”: “server”,  
“user”: “nsroot”,  
“validate\_certs”: true  
},  
“module\_name”: “netscaler”  
},  
“msg”: “Failed to validate the SSL certificate for 10.102.56.141:443. Make sure your managed systems have a valid CA certificate installed. If the website serving the url uses SNI you need python \>= 2.7.9 on your managed machine or you can install the `urllib3`, `pyopenssl`, `ndg-httpsclient`, and `pyasn1` python modules to perform SNI verification in python \>= 2.6. You can use validate\_certs=False if you do not need to confirm the servers identity but this is unsafe and not recommended. Paths checked for this platform: /etc/ssl/certs, /etc/pki/ca-trust/extracted/pem, /etc/pki/tls/certs, /usr/share/ca-certificates/cacert.org, /etc/ansible”  
}

Do we need to install python on the netscaler ? no permission for that though.
