Rename roles/post-install to roles/postinstall #238

Closed
opened 2026-08-18 04:25:43 +00:00 by brettweir · 6 comments
Member

The name post-install works most of the time, but according to ansible-lint it's an invalid role name, which suggests it could get flagged by other linters, including ones in Ansible Galaxy, for example.

It would be prudent to switch role/collection names to use snake_case, since Ansible borrows so many Python idioms in its conventions anyway. So post-install would be renamed to postinstall.

EDIT: changed post_install to postinstall.

The name `post-install` works most of the time, but according to `ansible-lint` it's an invalid role name, which suggests it could get flagged by other linters, including ones in Ansible Galaxy, for example. It would be prudent to switch role/collection names to use `snake_case`, since Ansible borrows so many Python idioms in its conventions anyway. So `post-install` would be renamed to `postinstall`. EDIT: changed `post_install` to `postinstall`.
brettweir changed title from Rename roles/post-install to roles/post_installl to Rename roles/post-install to roles/post_install 2026-08-18 04:25:54 +00:00
Member

I actually prefer "postinstall" over "post_install"

I actually prefer "postinstall" over "post_install"
Author
Member

@eseyman wrote in #238 (comment):

I actually prefer "postinstall" over "post_install"

Oh, good point! And that's consistent with the RH style guide anyway. I'm going to update the issue.

@eseyman wrote in https://forge.fedoraproject.org/server/tickets/issues/238#issuecomment-1340770: > I actually prefer "postinstall" over "post_install" Oh, good point! And that's consistent with the RH style guide anyway. I'm going to update the issue.
brettweir changed title from Rename roles/post-install to roles/post_install to Rename roles/post-install to roles/postinstall 2026-08-18 19:52:56 +00:00
Author
Member

The original point still stands that we should use snake_case for role names, but it doesn't matter in this case.

The original point still stands that we should use snake_case for role names, but it doesn't matter in this case.
Member

For the record, the default configuration of ansible-lint enforces: "Role names must contain only lowercase alphanumeric characters and the underscore _ character. Role names must also start with an alphabetic character."

For the record, the [default configuration of ansible-lint](https://docs.ansible.com/projects/lint/rules/role-name/) enforces: "Role names must contain only lowercase alphanumeric characters and the underscore _ character. Role names must also start with an alphabetic character."
Author
Member

Oh, excellent. So I guess some kind of change is required to make the tool happy anyway. 😄

Oh, excellent. So I guess some kind of change is required to make the tool happy anyway. 😄
Author
Member

Closing as already complete.

Closing as already complete.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
server/tickets#238
No description provided.