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

added dynamic docker swarm nodes inventory #42667

Open
wants to merge 2 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@morph027

morph027 commented Jul 12, 2018

SUMMARY

This adds a dynamic inventory for docker swarm nodes.

ISSUE TYPE
  • Feature Pull Request
ANSIBLE VERSION
2.5.0
@ansibot

This comment has been minimized.

@ansibot ansibot added the docker label Oct 28, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Nov 26, 2018

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

contrib/inventory/docker_swarm_nodes.py:85:1: E305 expected 2 blank lines after class or function definition, found 1

click here for bot help

@DBendit

Although new modules and plugins don't require changelog fragments, I don't believe dynamic inventory scripts fall into those categories - I'm double checking that in IRC now. If I'm right, then you'll need to include a changelog fragment along with this. See https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#creating-new-fragments for details.

Additionally, Ansible now supports inventory plugins as an alternative to dynamic inventory scripts. See https://docs.ansible.com/ansible/latest/plugins/inventory.html for more details there. It might be a better idea to implement this as an inventory plugin instead, as it has better integration with the rest of Ansible.

# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Installation

This comment has been minimized.

@DBendit

DBendit Dec 11, 2018

Contributor

Could you please wrap the documentation in a DOCUMENTATION block, similar to https://github.com/ansible/ansible/blob/devel/contrib/inventory/docker.py?

Additionally, please split into similar sections: general info, requirements, configuration, and examples. I see that you have most of these, but making it more explicit would be helpful for future users.

@ansibot

This comment has been minimized.

Contributor

ansibot commented Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment