aws_resource_actions没有给出预期的结果

时间:2019-10-10 09:12:14

标签: amazon-web-services amazon-ec2 ansible

我有一部剧本,其中有几个角色要在AWS实例上执行。我想获取ec2模块上使用的所有AWS资源操作的列表,以便我可以使用这些权限创建特定的IAM角色。但是我无法按照文档获取指定的输出。 我已经根据文档进行了更改。 将ansible.cfg修改为

[defaults]
callback_whitelist = aws_resource_actions

在剧本上,我也给该组起了以下名字:获取实例详细信息并附加ebs卷

  hosts: some hosts
  module_defaults:
    group/aws:
      debug_botocore_endpoint_logs: True
  gather_facts: yes
  roles:
    - a_role

我还添加了对ec2任务的修改,也添加了此

- name : Create EBS one
  ec2_vol:
    region: "{{ region }}"
    instance: "{{ item}}"
    device_name: "{{ device }}"
    volume_type: "{{ vol_type }}"
    volume_size: "{{ vol_size }}"
    delete_on_termination: yes
    encrypted: yes
    debug_botocore_endpoint_logs: yes
    tags:
      Name: "{{ vol_name }}"      
  register: EBSdetails

有人可以指出我错过的内容吗?

0 个答案:

没有答案