ansible - Trying to gather VPC subnet facts for an instance in AWS is showing error -


fatal: [ubuntu@xx.xx.xx.xx]: failed! => {     "changed": false,      "failed": true,      "invocation": {         "module_args": {             "aws_access_key": null,              "aws_secret_key": null,              "ec2_url": null,              "filters": {                 "region": "us-east-1",                  "vpc-id": "xxxxxxxxx"             },              "profile": null,              "region": null,              "security_token": null,              "validate_certs": true         }     },      "msg": "region must specified" } 

i getting aforementioned error quite sometime while trying gather details vpc subnet facts particular instance in aws. can please if doing wrong ? have gone through ansible doc on same , based on knowledge created yml.

my yml file looks :

---  - name: find vpc facts    hosts: webservers    gather_facts: true    tasks:     - name: vpc subnet facts       ec2_vpc_subnet_facts:        filters:          region: us-east-1          vpc-id: xxxxxxxx       register: subnet_facts 

region must specified

when calling ec2 modules, should specify region module parameter:

- name: vpc subnet facts   ec2_vpc_subnet_facts:     region: us-east-1     filters:       vpc-id: xxxxxxxx   register: subnet_facts 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -