Bug 1269988

Summary: RFE: Create a directory for ansible-galaxy installed roles
Product: [Fedora] Fedora Reporter: Nathanael Noblet <nathanael>
Component: ansibleAssignee: Kevin Fenzi <kevin>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.badger, athmanem, kevin, kupo, maxim, maxwell
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-04 02:30:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Move roles to /var/lib/ansible/roles none

Description Nathanael Noblet 2015-10-08 17:36:26 UTC
Created attachment 1081072 [details]
Move roles to /var/lib/ansible/roles

It seems like placing galaxy installed roles in /etc/ansible/roles is probably? against some packaging guidelines. I'm suggesting that ansible be configured by default to place these types of files in /var/lib/ansible instead.

Thoughts?

Comment 1 Nathanael Noblet 2015-10-08 17:37:11 UTC
Scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=11375729

Comment 2 Kevin Fenzi 2015-10-10 02:48:02 UTC
Seems reasonable to me. We should upstream this also though...

Comment 3 Fedora End Of Life 2016-11-24 12:43:57 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Nathanael Noblet 2016-11-24 17:08:29 UTC
So I looked and I'm not familiar enough with python and the upstream project to really have a clue. To me even if this doesn't get upstreamed its still a downstream decision to follow certain filesystem rules/expectations by providing a default config.

Comment 5 Maxwell G 2022-07-04 02:30:11 UTC
> I'm suggesting that ansible be configured by default to place these types of files in /var/lib/ansible instead.

/usr/share is usually the correct place for this kind of stuff and /usr/share/ansible/roles (now)[0] exists. /var/lib is for "variable state information", according to the FHS[1]. If you'd like to change the default roles search path, you can configure[2] this on your own system. 

[0]: I'm not sure if it did when you initially created the bug.
[1]: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s08.html
[2]: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-roles-path

Comment 6 Nathanael Noblet 2022-07-04 15:42:46 UTC
Yeah, I'm fine with wherever. When I first filed the bug it seemed really odd to me that there was an /etc/ansible/roles directory and that's where ansible-galaxy installed roles. I'm no FHS expert but it seemed like /var/lib was better than /usr/share mostly because I expected /usr/share content to be rpm owned/managed and /var/lib I don't.