ansible wont use csh even if it set in inverntory

147 views
Skip to first unread message

Michael Veselovski

unread,
Jul 17, 2015, 8:34:00 AM7/17/15
to ansible...@googlegroups.com
Hello 

I'm having problem with using ansible with my freebsd 10.1 hosts

there is example of my play 

freebsd.local ansible_ssh_host=192.168.2.110  ansible_ssh_pass='XXXXXXXXX' ansible_shell_type=csh ansible_python_interpreter=/usr/local/bin/python 


and there is example of output

ansible new-hosts -l freebsd.local -m shell -a 'uptime'  -vvv 
<192.168.2.110> ESTABLISH CONNECTION FOR USER: root
<192.168.2.110> REMOTE_MODULE command uptime #USE_SHELL
<192.168.2.110> EXEC sshpass -d6 ssh -C -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/michael/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o GSSAPIAuthentication=no -o PubkeyAuthentication=no -o User=root -o ConnectTimeout=10 192.168.2.110 /bin/sh -c 'env LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/local/bin/python'

in if I run  sshpass command I've got

debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/michael/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/michael/.ssh/id_dsa
debug1: Trying private key: /home/michael/.ssh/id_ecdsa
debug1: Trying private key: /home/michael/.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive


on host side I see only this when I press ctrl+c

Jul 17 14:03:20 freebsd sshd[769]: Connection closed by 192.168.2.152 [preauth]

ansible --version
ansible 1.9.2
  configured module search path = None

python on ansible host

python -V
Python 2.7.9

on freebsd
python -V
Python 2.7.10

any ideas where I should dig further  ? 

thanks

Michael


Brian Coca

unread,
Jul 17, 2015, 9:01:13 AM7/17/15
to ansible...@googlegroups.com
if you are using ssh passwords, switch to paramiko as your transport,
the normally installed sshpass cannot handle FreeBSD password prompts,
paramiko doesn't use sshpass and can bypass this.

ansible_shell_type does not force csh execution, it is there for when
your default shell is csh and ansible needs to quote thing differently
to pipe over ssh.

--
Brian Coca
Reply all
Reply to author
Forward
0 new messages