Skip to content

Connection to the localhost fails silently, resulting in the wrong return code. #38

Description

@pylSER

HI, I am using

python 3.7.4 suitable = "^0.16.0" ansible 2.8.5

And I found that the return code is not correct when there are multi hosts:

say I would like to check if a directory exists on every host:

cmd = "test -d  /the/dir/does/not/exist/on/some/of/the/hosts"
res = Api(iplist, remote_user="root", host_key_checking=False, ignore_errors=True).shell(cmd)
for ip in iplist:
    res_code = res.rc(ip)
    # all res code will be 0

Am I using it in a wrong manner? Or it is a bug?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions