Bug 206656 - sysutils/ansible: add dependency on py-netaddr
Summary: sysutils/ansible: add dependency on py-netaddr
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dmitry Marakasov
Keywords: easy, needs-qa, patch
Depends on:
Reported: 2016-01-27 00:36 UTC by Dmitry Marakasov
Modified: 2016-01-27 14:50 UTC (History)
1 user (show)

See Also:
amdmi3: maintainer-feedback+

Patch (782 bytes, patch)
2016-01-27 00:36 UTC, Dmitry Marakasov
no flags Details | Diff
Patch (1.31 KB, patch)
2016-01-27 13:42 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer 2016-01-27 00:36:53 UTC
Created attachment 166165 [details]

Ansible contains ipaddr Jinja2 filter:

However it requires py-netaddr to run, otherwise:

fatal: [myhost]: FAILED! => {"changed": false, "failed": true, "msg": "AnsibleFilterError: ERROR! The ipaddr filter requires python-netaddr be installed on the ansible controller"}

So add py-netaddr to the dependency list.

Note that there could be more hidden dependencies on other python modules. These dependencies could be also made optional in the port.
Comment 1 Nikolai Lifanov 2016-01-27 03:01:46 UTC
Hi! I'm a bit hesitant to add dependencies that enable specific Ansible features.
In this specific case, the error message is specific about what is missing.
We already depend on more than upstream setup.py specifies, and to provide
coverage for core and extra modules, we would need to depend on things like
py-boto and other heavy dependencies, not to mention OpenStack libraries, some
of which haven't even be ported.

Having said this, adding py-netaddr makes sense and I approve this patch.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2016-01-27 03:14:28 UTC
Reporter is Committer, assign accordingly
Comment 3 Dmitry Marakasov freebsd_committer 2016-01-27 13:42:21 UTC
Created attachment 166187 [details]

IMO all possible dependencies should be listed, but as optionals and possibly disabled by default (heavy ones at least). If there's demand, slave port(s) may be added with different options sets (like vim/vim-lite), and when flavors are at last introduced that'll be even better.

Anyway I've changed the patch to make dependency optional (enabled be default as it's not the heavy one). While here, use options target helper for EXAMPLES. What do you think?
Comment 4 Nikolai Lifanov 2016-01-27 14:00:14 UTC
This change looks good to me for now. Long-term, once all outstanding issues with sysutils/ansible are resolved and I obsolete and remove sysutils/ansible1, I will work on a port with full dependencies and a -lite variety.
Comment 5 Dmitry Marakasov freebsd_committer 2016-01-27 14:49:46 UTC
Great, thank you!
Comment 6 commit-hook freebsd_committer 2016-01-27 14:50:16 UTC
A commit references this bug:

Author: amdmi3
Date: Wed Jan 27 14:49:45 UTC 2016
New revision: 407360
URL: https://svnweb.freebsd.org/changeset/ports/407360

  - Add dependency on py-netaddr needed for ipaddr() filter
  - Switch to options helpers

  PR:		206656
  Submitted by:	amdmi3
  Approved by:	lifanov@mail.lifanov.com (maintainer)