Hello, i'm trying to get instance information, but my inventory has ignored
by ansible\ec2 modules.
/etc/ansible/ansible.cfg
[inventory]
# enable inventory plugins, default: 'host_list', 'script', 'auto', 'yaml',
'ini', 'toml'
#enable_plugins = host_list, virtualbox, yaml, constructed
enable_plugins = aws_ec2
My inventory:
plugin: aws_ec2
regions:
- ap-northeast-2
filters:
"tag:Name":
- "instance1"
- "instance2"
Im my config i use default region us-east-1.
my task:
- hosts: localhost
gather_facts: False
tasks:
- name: get instance info
ec2_instance_info:
filters:
instance-state-name: [ "running" ]
- name: List of instances
debug:
msg: "{{ instances }}"
And whatever region i use, i'm always get info from my config region
us-east, when ansible-inveintory stil give me right information about
instances in ec_aws plugin.
I want to use 2-3 inventory one by region. But always get default region
info. Please help =)
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1dabb79f-5868-432b-9f57-9987d5b772f9%40googlegroups.com.