[英]how to run ansible playbook in aws lambda function
I was trying the below link method where i have uploaded the zip file to lambda function and by passing parameters executed the lambda. 我正在尝试下面的链接方法,其中我已将zip文件上传到lambda函数,并通过传递参数来执行lambda。 That throws error as follow. 这引发如下错误。 Please suggest me how to solve this , how i can run lambda with playbook 请建议我如何解决此问题,如何使用Playbook运行Lambda
[1]: https://medium.com/@jacoelho/ansible-in-aws-lambda-980bb8b5791b [1]:https://medium.com/@jacoelho/ansible-in-aws-lambda-980bb8b5791b
START RequestId: 9c140646-5a3c-430b-81cf-458aaa7cdd77 Version: $LATEST
module initialization error: Invalid settings supplied for DEFAULT_LOCAL_TMP: Unable to create local directories(/home/sbx_user1051/.ansible/tmp):
[Errno 30] Read-only file system: '/home/sbx_user1051'
Traceback (most recent call last):
File "/var/task/ansible/config/manager.py",
line 489, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/var/task/ansible/config/manager.py",
line 434, in get_config_value_and_origin
value = ensure_type(value, defs[config].get('type'), origin=origin)
File "/var/task/ansible/config/manager.py",
line 91, in ensure_type
makedirs_safe(value, 0o700)
File "/var/task/ansible/utils/path.py",
line 81, in makedirs_safe
raise AnsibleError("Unable to create local directories(%s): %s" % (to_native(rpath), to_native(e)))
AnsibleError: Unable to create local directories(/home/sbx_user1051/.ansible/tmp): [Errno 30] Read-only file system: '/home/sbx_user1051'
END RequestId: 9c140646-5a3c-430b-81cf-458aaa7cdd77
REPORT RequestId: 9c140646-5a3c-430b-81cf-458aaa7cdd77 Duration: 45.12 ms Billed Duration: 100 ms Memory Size: 1472 MB Max Memory Used: 65 MB
module initialization error
Invalid settings supplied for DEFAULT_LOCAL_TMP: Unable to create local directories(/home/sbx_user1051/.ansible/tmp): [Errno 30] Read-only file system: '/home/sbx_user1051'
Traceback (most recent call last):
File "/var/task/ansible/config/manager.py",
line 489, in update_config_data
value, origin = self.get_config_value_and_origin(config, configfile)
File "/var/task/ansible/config/manager.py",
line 434, in get_config_value_and_origin
value = ensure_type(value, defs[config].get('type'), origin=origin)
File "/var/task/ansible/config/manager.py",
line 91, in ensure_type
makedirs_safe(value, 0o700)
File "/var/task/ansible/utils/path.py",
line 81, in makedirs_safe
raise AnsibleError("Unable to create local directories(%s): %s" % (to_native(rpath), to_native(e)))
AnsibleError: Unable to create local directories(/home/sbx_user1051/.ansible/tmp): [Errno 30] Read-only file system: '/home/sbx_user1051'
You did not change the temp directory as indicated in the post: 您没有按照帖子中的指示更改临时目录:
# use /tmp instead of $HOME
ansible.constants.DEFAULT_REMOTE_TMP = '/tmp/ansible'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.