Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

主机密码设置错误 #6

Open
heaquan opened this issue Apr 25, 2019 · 1 comment
Open

主机密码设置错误 #6

heaquan opened this issue Apr 25, 2019 · 1 comment

Comments

@heaquan
Copy link

heaquan commented Apr 25, 2019

Traceback (most recent call last):
File "/home/xxx/Network/scms/ansible-test.py", line 14, in
result = runner.run()
File "/home/xxx/Network/scms/ansible2_myAPI/runner.py", line 158, in run
raise Exception(e)
Exception: 'str' object has no attribute 'get'

提示这个错误呢?什么原因呢

from ansible2_myAPI.runner import Runner

runner = Runner(
module_name="shell",
module_args="uptime",
remote_user="test",
pattern="all",
hosts="172.19.0.70, ",
passwords='123'

)

result = runner.run()

@heaquan heaquan changed the title 'str' object has no attri{ "hostname": "172.19.15.70", "ip": "172.19.15.70", "port": 22, "username": "sqhuo", "password": "123456", }bute 'get' Exception: 'str' object has no attribute 'get' Apr 25, 2019
@heaquan heaquan changed the title Exception: 'str' object has no attribute 'get' 主机密码设置 Apr 25, 2019
@heaquan heaquan changed the title 主机密码设置 主机密码设置错误 Apr 25, 2019
@Joshuapy
Copy link
Owner

Joshuapy commented Jun 5, 2019

用sshkey的方式试下 别用密码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants