Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip non-management Packet IP addresses #48168

Merged

Conversation

dbnicholson
Copy link
Contributor

@dbnicholson dbnicholson commented Nov 6, 2018

Non-management (elastic) IP addresses require manual configuration on
the host as described in https://help.packet.net/article/54-elastic-ips.
Skip those so that only the automatically configured management
addresses are used. Otherwise, a non-routable address may be returned in
the inventory.

SUMMARY

Fixes #48166.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

contrib/inventory/packet_net.py

ANSIBLE VERSION
ansible 2.5.2
  config file = /home/dan/.ansible.cfg
  configured module search path = [u'/home/dan/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15 (default, May  9 2018, 11:32:33) [GCC 7.3.1 20180130 (Red Hat 7.3.1-2)]
ADDITIONAL INFORMATION

Makes the packet.net dynamic inventory only include management addresses, which are automatically supported in packet and most likely to be routable.

@ansibot
Copy link
Contributor

ansibot commented Nov 6, 2018

Hi @dbnicholson, thank you for submitting this pull-request!

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. c:inventory/contrib_script community_review In order to be merged, this PR must follow the community review workflow. inventory Inventory category needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. labels Nov 6, 2018
@ansibot
Copy link
Contributor

ansibot commented Nov 6, 2018

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

contrib/inventory/packet_net.py:309:5: E129 visually indented line with same indent as next logical line

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels Nov 6, 2018
Non-management (elastic) IP addresses require manual configuration on
the host as described in https://help.packet.net/article/54-elastic-ips.
Skip those so that only the automatically configured management
addresses are used. Otherwise, a non-routable address may be returned in
the inventory.
@dbnicholson dbnicholson force-pushed the packet-inventory-management-only branch from e6e0eb5 to ef1834f Compare November 6, 2018 17:38
@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Nov 6, 2018
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Nov 8, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 16, 2018
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Nov 24, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 4, 2018
@gundalow gundalow closed this Dec 12, 2018
@gundalow gundalow reopened this Dec 12, 2018
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Dec 12, 2018
@gundalow gundalow merged commit 3ada56e into ansible:devel Dec 20, 2018
kbreit pushed a commit to kbreit/ansible that referenced this pull request Jan 11, 2019
Non-management (elastic) IP addresses require manual configuration on
the host as described in https://help.packet.net/article/54-elastic-ips.
Skip those so that only the automatically configured management
addresses are used. Otherwise, a non-routable address may be returned in
the inventory.
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 bug This issue/PR relates to a bug. c:inventory/contrib_script community_review In order to be merged, this PR must follow the community review workflow. inventory Inventory category new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packet.net dynamic inventory should skip non-management addresses
4 participants