- name: Create S3 bucket
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Creating S3 bucket
s3:
key_name: LampKey
bucket: biju-ansible-bucket
mode: create
我正在使用上面的代码来创建S3 bucket。
然而,当我运行上面的剧本时,我得到了这个错误:
TASK [Creating S3 bucket] *****************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "This module has been removed. The module documentation for Ansible-2.6 may contain hints for
porting"}
为什么我会出现此错误?
用was_s3
替换模块s3
解决了此错误
- name: Create S3 bucket
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Creating S3 bucket
aws_s3:
aws_access_key: xx
aws_secret_key: yy
bucket: biju_ansible_bucket
mode: create