Bug 232377 - sysutils/ansible: default path to ansible.cfg is not /usr/local/etc/ansible/ansible.cfg
Summary: sysutils/ansible: default path to ansible.cfg is not /usr/local/etc/ansible/a...
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: Nikolai Lifanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 10:43 UTC by Tomoyuki Sakurai
Modified: 2019-05-23 23:01 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (lifanov)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomoyuki Sakurai 2018-10-18 10:43:28 UTC
as the port patches the source by seding s|/etc/ansible|${ETCDIR}|g, /usr/local/etc/ansible/ansible.cfg is not picked up by ansible. as a consequence, all other path, such as path to group_vars and roles, are also affected. 

in other distribution, the search path for ansible.cfg includes /etc/ansible/ansible.cfg, which should be translated to /usr/local/ansible/ansible.cfg in FreeBSD.

this results in an interesting path to ansible.cfg; /usr/local/etc/py27-ansible/ansible/ansible.cfg

i do not think that modifying default path to configuration file, other than /usr/local, is a good idea. having multiple ${ETCDIR} for multiple python flavors is a quite surprise in this case. this breaks some other tools, i.e. ansible.cfg is not picked up by the tool.
Comment 1 commit-hook freebsd_committer 2018-11-05 02:07:30 UTC
A commit references this bug:

Author: lifanov
Date: Mon Nov  5 02:07:11 UTC 2018
New revision: 484164
URL: https://svnweb.freebsd.org/changeset/ports/484164

Log:
  update sysutils/ansible* ports

  sysutils/ansible: 2.7.1
  Changes: https://github.com/ansible/ansible/blob/v2.7.1/changelogs/CHANGELOG-v2.7.rst

  sysutils/ansible26: 2.6.7
  Changes: https://github.com/ansible/ansible/blob/v2.6.7/changelogs/CHANGELOG-v2.6.rst

  sysutils/ansible25: 2.5.11
  Changes: https://github.com/ansible/ansible/blob/v2.5.11/changelogs/CHANGELOG-v2.5.rst

  All ports: move default configuration directory back to LOCALBASE/etc/ansible as
  before the flavors conversion. Configuration is version-specific and not Python-specific
  and this is a more intuitive location.

  PR:		232377
  Reported by:	Tomoyuki Sakurai (default configuration path)

Changes:
  head/UPDATING
  head/sysutils/ansible/Makefile
  head/sysutils/ansible/distinfo
  head/sysutils/ansible1/Makefile
  head/sysutils/ansible23/Makefile
  head/sysutils/ansible24/Makefile
  head/sysutils/ansible25/Makefile
  head/sysutils/ansible26/Makefile
  head/sysutils/ansible26/distinfo
Comment 2 Nikolai Lifanov freebsd_committer 2019-05-23 23:01:15 UTC
Thank you for the report!