On 12/5/22 23:48, phillip.from.oz wrote:
> This is what I'm doing:
> Playbook:
> ---
> - name: Connect to remote IRIS DB
> hosts: localhost
> tasks:
> - name: using my custom module
> IRIS: <-- New Module
> name: superuser
> password: secret
> instance: SCR
> namespace: WORK
> commands:
> - w !,”Hello”
> - w !,”World”
> register: result
> - name: show output
> debug:
> var: result
>
> This is the logic:
> ssh localhost
I'd rather use
delegate_to: localhost
for this particular task.
AFAICS this won't result in a SSH connection to local host.
But of course you have to manage the DB connection inside your module.
Ciao, Michael.