Bug 232377

Summary: sysutils/ansible: default path to ansible.cfg is not /usr/local/etc/ansible/ansible.cfg
Product: Ports & Packages Reporter: Tomoyuki Sakurai <trombik1973>
Component: Individual Port(s)Assignee: Nikolai Lifanov <lifanov>
Status: Closed FIXED    
Severity: Affects Some People CC: trombik1973
Priority: --- Flags: bugzilla: maintainer-feedback? (lifanov)
Version: Latest   
Hardware: Any   
OS: Any   

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 freebsd_triage 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 freebsd_triage 2019-05-23 23:01:15 UTC
Thank you for the report!