turns out Ansible (2.7.4, 2.8.0.dev0 in my case) auto-magically changes
connection plugin seeing aruba* name.
Prefixing my module name (mv aruba_smart_vm.py it_aruba_smart_vm.py) helped.

MZ

On Thu, Dec 6, 2018 at 5:38 PM Mark Zhitomirski <marcuz...@gmail.com> wrote:

> Hi!
>
> I've started writing a new module for managing one Aruba Cloud provider
>
> https://github.com/mz0/ansible/blob/329b9c199f/lib/ansible/modules/cloud/aruba_smart/aruba_smart_vm.py
> and modeled my module on the digital_ocean_sshkey module.
>
> However I cannot run my module - it fails very early on connection attempt
> which it quite unexpectedly does differently then the model module.
> Here're the relevant first lines of the good module run:
>
> TASK [digital_ocean_sshkey]
> **************************************************************
> task path: <repo>/lib/ansible/modules/cloud/digital_ocean/try1.yml:5
> File lookup using <secret>/do/my.apikey as file
> *<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: mz0*
> <127.0.0.1> EXEC /bin/sh -c 'echo ~mz0 && sleep 0'
> <127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo
> ~/.ansible/tmp/ansible-tmp-1..
>
> Very early my module runs very differently (note the Subj. line):
>
> TASK [aruba_smart_vm]
> ********************************************************************
> task path: <repo>/lib/ansible/modules/cloud/aruba_smart/try1.yml:5
> File lookup using <secret>/aruba/my.password as file
> File lookup using <secret>/aruba/my.user as file
> *<127.0.0.1> using connection plugin network_cli (was local)*
> <127.0.0.1> starting connection from persistent connection plugin
> <127.0.0.1> local domain socket does not exist, starting it
> <127.0.0.1> control socket path is ~/.ansible/pc/...
> <127.0.0.1>
> The full traceback is:
> Traceback (most recent call last):
>   File "<repo>/bin/ansible-connection", line 103, in start
>     self.connection._connect()
>   File "<repo>/lib/ansible/plugins/connection/network_cli.py", line 313,
> in _connect
>     ssh = self.paramiko_conn._connect()
>   File "<repo>/lib/ansible/plugins/connection/paramiko_ssh.py", line 246,
> in _connect
>     self.ssh = SSH_CONNECTION_CACHE[cache_key] = self._connect_uncached()
>   File "<repo>/lib/ansible/plugins/connection/paramiko_ssh.py", line 362,
> in _connect_uncached
>     raise AnsibleConnectionFailure(msg)
> AnsibleConnectionFailure: paramiko: The authenticity of host '127.0.0.1'
> can't be established.
>
> This playbook & module are here:
>
> https://github.com/mz0/ansible/tree/329b9c199f/lib/ansible/modules/cloud/aruba_smart
>
> The good playbook is very much the same:
>
> https://github.com/mz0/ansible/blob/329b9c199f/lib/ansible/modules/cloud/digital_ocean/try1.yml
>
> Please, suggest me the best course of action.
> MZ
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-devel+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
MZ

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to