gpt4 book ai didi

amazon-web-services - ansible local_action 返回错误 "invalid output was: [sudo via ansible, key=xxx] password:"

转载 作者:行者123 更新时间:2023-12-04 16:52:52 25 4
gpt4 key购买 nike

我一直在尝试运行这个 ansible playbook 来获取 AWS 资源标签:
- name: list resource tags
local_action: ec2_tag resource=i-abcdefg region=us-east-1 state=list
register: result

并返回此错误:

failed: [ec2-11-222-333-444.compute-1.amazonaws.com] => {"failed": true, "parsed": false} invalid output was: [sudo via ansible, key=heoqwlqnhxlxyzwnxmtbvmdtvmvjbsux] password:

FATAL: all hosts have already failed -- aborting



我该如何解决

最佳答案

您不能以 root 身份运行此 local_action。将您的任务更改为:
- name: list resource tags
sudo: false
local_action: ec2_tag resource=i-abcdefg region=us-east-1 state=list
register: result

关于amazon-web-services - ansible local_action 返回错误 "invalid output was: [sudo via ansible, key=xxx] password:",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24413935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com