Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor as Ansible Collection and Roles #181

Closed
wants to merge 7 commits into from
Closed

Conversation

db0
Copy link
Contributor

@db0 db0 commented Oct 5, 2023

As requested here: #180

I am delivering a proof-of-concept refactor on how you can switch the current repository to ansible collections and roles. For this initial draft, I have simply split the lemmy stuff from pictrs-safety into individual roles and added the 'photon' role. The expectation is that each component of lemmy can be split into its own role. backend, rust_ui, pict_rs, pictrs_safety, proton, alexandrite etc

The backend role contains every lemmy component right now, as I don't have time to do more. But the way I extricated pictrs_safety can be used for the others, and to add new frontends follow the approach of photon. I don't know the process to make a frontend the "default", so you'd have to add that yourselves.

I have also made some improvements on your existing ansible code:

  • Avoid creating new playbook per distro. One role can handle multiple distros, by using include_tasks and lookup and only the distinct code per distro needs to be split.
  • Switch to using inventory.yml instead of hosts for better readability

Note: This collection is untested. There's may be some syntax errors etc. But the general conversion is accurate..

@codyro
Copy link
Collaborator

codyro commented Oct 5, 2023

You stated in the parent issue that you're done working on this at this time. If that's the case, would you mind if I fork this and make some (opinionated) tweaks?

@db0
Copy link
Contributor Author

db0 commented Oct 5, 2023

Feel free to fork it, or work directly on my branch. Yes I'm done working on it for now due to other commitments.

@ticoombs ticoombs modified the milestones: 2.0.0, 2.x Oct 9, 2023
@ticoombs
Copy link
Collaborator

Closing. Thanks for the PR example!

@ticoombs ticoombs closed this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants