Skip to content

Only read EC2 regions_exclude list if necessary - #18720

Merged
s-hertel merged 1 commit into
ansible:develfrom
stevekuznetsov:skuznets/ec2-dynamic-inventory
Mar 22, 2017
Merged

s-hertel merged 1 commit into
ansible:develfrom
stevekuznetsov:skuznets/ec2-dynamic-inventory

Conversation

@stevekuznetsov

Copy link
Copy Markdown
Contributor
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

EC2 dynamic inventory

ANSIBLE VERSION
$ ansible --version
ansible 2.2.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
SUMMARY

When specifying a literal whitelist of AWS EC2 regions in the dynamic
inventory configuration file, it should not be necessary to also include
a literal blacklist, especially as the blacklist is not honored in this
case anyway. By reading the literal blacklist only when necessary, it is
possible for a user to provide a more minimal EC2 configuration file.

Signed-off-by: Steve Kuznetsov [email protected]

@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

The failure in Shippable doesn't seem related to this PR but instead some infrastructure failure...

2016-12-02 20:59:43 Unit test with Python 2.6
2016-12-02 20:59:43 Run command: pytest -r a --color yes --junit-xml test/results/junit/python2.6-units.xml -v test/units/contrib/inventory/test_vmware_inventory.py
2016-12-02 20:59:44 ============================= test session starts ==============================
2016-12-02 20:59:44 platform linux2 -- Python 2.6.9, pytest-3.0.4, py-1.4.31, pluggy-0.4.0 -- /root/src/github.com/ansible/ansible/test/runner/.tox/py26/bin/python2.6
2016-12-02 20:59:44 cachedir: .cache
2016-12-02 20:59:44 rootdir: /root/src/github.com/ansible/ansible, inifile: 
2016-12-02 20:59:44 collecting ... collected 0 items / 1 skipped
2016-12-02 20:59:44 
2016-12-02 20:59:44  generated xml file: /root/src/github.com/ansible/ansible/test/results/junit/python2.6-units.xml 
2016-12-02 20:59:44 =========================== short test summary info ============================
2016-12-02 20:59:44 SKIP [1] /root/src/github.com/ansible/ansible/test/units/contrib/inventory/test_vmware_inventory.py:13: SkipTest: test_vmware_inventory.py requires the python module 'vmware_inventory'
2016-12-02 20:59:44 ========================== 1 skipped in 0.13 seconds ===========================
2016-12-02 20:59:44 ERROR: Command "pytest -r a --color yes --junit-xml test/results/junit/python2.6-units.xml -v test/units/contrib/inventory/test_vmware_inventory.py" returned exit status 5.
2016-12-02 20:59:44 ERROR: InvocationError: '/root/src/github.com/ansible/ansible/test/runner/test.py units -v --coverage --require test/units/contrib/ --color yes --requirements --python 2.6'
2016-12-02 20:59:44 ___________________________________ summary ____________________________________
2016-12-02 20:59:44 ERROR:   py26: commands failed
2016-12-02 20:59:44 ERROR: Command "tox -c test/runner/tox.ini -e py26 -- /root/src/github.com/ansible/ansible/test/runner/test.py units -v --coverage --require test/units/contrib/ --color yes --requirements --python 2.6" returned exit status 1.

Can the tests be re-kicked?

@ansibot ansibot added affects_2.3 This issue/PR affects Ansible v2.3 bugfix_pullrequest labels Dec 13, 2016
@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Dec 16, 2016
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jan 3, 2017
@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

@bcoca @jctanner thoughts on this?

@ansibot

ansibot commented Feb 14, 2017

Copy link
Copy Markdown
Contributor

@ansibot ansibot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label Feb 14, 2017
@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Feb 14, 2017
@s-hertel

s-hertel commented Mar 7, 2017

Copy link
Copy Markdown
Contributor

@stevekuznetsov It looks like there are merge conflicts. Shippable will run again when you fix that.

@stevekuznetsov
stevekuznetsov force-pushed the skuznets/ec2-dynamic-inventory branch from 0d38092 to b146484 Compare March 8, 2017 14:30
When specifying a literal whitelist of AWS EC2 regions in the dynamic
inventory configuration file, it should not be necessary to also include
a literal blacklist, especially as the blacklist is not honored in this
case anyway. By reading the literal blacklist only when necessary, it is
possible for a user to provide a more minimal EC2 configuration file.

Signed-off-by: Steve Kuznetsov <[email protected]>
@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

@s-hertel rebased and updated

@ansibot ansibot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 8, 2017
@stevekuznetsov

Copy link
Copy Markdown
Contributor Author

@s-hertel ping

@s-hertel
s-hertel merged commit 6318229 into ansible:devel Mar 22, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects_2.3 This issue/PR affects Ansible v2.3 bug This issue/PR relates to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants