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

wish: add ansible-jsonpatch to galaxy #14

Open
tpo opened this issue May 17, 2020 · 15 comments
Open

wish: add ansible-jsonpatch to galaxy #14

tpo opened this issue May 17, 2020 · 15 comments

Comments

@tpo
Copy link
Contributor

tpo commented May 17, 2020

Hi,

currently ansible-jsonpatch is living on my system in my ansible repo as a submodule. Submodule handling in git sucks in various ways. I could manage it outside of my ansible repo, but then, why not do the next step too and have ansible-jsonpatch on galaxy. That way I could manage it just like any other galaxy role/module...

?

Would be nice!

In case you loathe learning new galaxy processes then I can assist you through it having done it recently. -> DM.

Thanks for ansible-jsonpatch!
*t

@particledecay
Copy link
Owner

Yep, this is a good idea. I already have content on galaxy.ansible.com so I should go ahead and move more of my stuff in there. I'll try and get on this sometime this week.

@particledecay
Copy link
Owner

@tpo I wouldn't mind chatting about the best way to get this in there. You can find me on PySlackers (pythondev.slack.com). I'm on a million other slack teams too but I figure that one's the most relevant to ansible (there isn't an ansible slack though).

@particledecay
Copy link
Owner

Well, here's my latest attempt. Take 2! ansible-collections/community.general#378

@tpo
Copy link
Contributor Author

tpo commented May 20, 2020

@tpo I wouldn't mind chatting about the best way to get this in there. You can find me on PySlackers (pythondev.slack.com). I'm on a million other slack teams too but I figure that one's the most relevant to ansible (there isn't an ansible slack though).

There doesn't seem to be a way to sign on to Slack any more: https://slack.com/intl/en-ch/get-started#/

It seems you need to invite me. Please invite the emai address tpo_pythondev.slack.com at sourcepole.ch .

@tpo
Copy link
Contributor Author

tpo commented May 20, 2020

Well, here's my latest attempt. Take 2! ansible-collections/community.general#378

currently some of the module's tests are failing... ansible-collections/community.general#378 (comment)

@particledecay
Copy link
Owner

@tpo you can join the slack from this page: https://pyslackers.com/web. They have a "Join" button right in the middle.

As far as the tests... I'll check out some details tonight, though that ansible-doc failure looks suspicious.

@godeater
Copy link

I noticed the PR on ansible-collections is closed now - is the work on getting it merged there dead now?

@particledecay
Copy link
Owner

@godeater yes, unfortunately I've had a pretty poor experience with Ansible folks, so I haven't pushed that any further. If someone's willing to help a bit I'd be willing to pick it back up?

@kepstin
Copy link

kepstin commented Nov 20, 2023

This issue was closed, but it doesn't look like it was resolved - I think the original request was to publish this module in a separate, standalone collection on ansible galaxy under a personal namespace? It doesn't need to be merged into any ansible-maintained git repositories.

See the documentation for Creating collections, but to summarize I think the main steps required would be:

  • Move files around a bit in the git repo to follow the collection structure
    • json_patch.py goes in plugins/modules/json_patch.py
    • test_json_patch.py goes in tests/unit/plugins/modules/test_json_patch.py to be run by ansible-test
  • Add the galaxy.yml metadata file
  • At this point, people could use ansible-galaxy to install directly from the git repo, but to publish a release:
  • Follow the instructions for Distributing collections to build and publish a release to ansible galaxy.

@particledecay
Copy link
Owner

I don't mind hosting it there under my own account. If there's still value in this, I can look into it tonight.

@godeater
Copy link

I'd say it's still useful for people, so I think you should publish it if you can - I'm actually hosting it in a collection in our internal (and therefore private) galaxy hub for our teams to use - we definitely find it useful!

@tpo
Copy link
Contributor Author

tpo commented Nov 22, 2023

I'd say it's still useful for people, so I think you should publish it if you can - I'm actually hosting it in a collection in our internal (and therefore private) galaxy hub for our teams to use - we definitely find it useful!

I just want to let you @particledecay know that we're still using ansible-jsonpatch, it's being accessed by some playbooks of ours, and we are very happy and grateful to be able to do so.

Publishing it on galaxy would make the module a bit cleaner and easier to use, however this by no means we request or demand that. Having it on galaxy would just "polish" the module a bit more.

Thanks a lot for having made the module available to the universe in the first place!!!

@particledecay
Copy link
Owner

Sorry, I only meant whether having it on Galaxy would still be useful haha, not the module. But great to hear you're enjoying it! Don't worry I'm not going to archive or drop this anytime soon 😉

@particledecay particledecay reopened this Jan 23, 2024
@numo68
Copy link

numo68 commented Dec 27, 2024

Hello, first, thanks for your work on the module. Was/is there any progress in getting this into Galaxy?

Searching for the options for editing a json I found the https://python-json-patch.readthedocs.io/en/latest/ , which at least according to the docs seems pretty complete. Is there any plan to use that PyPI-available module for the actual patching instead of doing the hard work by the code itself?

Thanks

@particledecay
Copy link
Owner

Was/is there any progress in getting this into Galaxy?

No progress on this unfortunately, I've been pretty out of touch with Galaxy and how they accept contributions lately. I can take another look today quickly to see if it's easy enough to get it in.

Is there any plan to use that PyPI-available module

Nope! The code works as-is and also adds a useful feature that's not part of the RFC, so for now I don't have any plans to replace it. It might be worthwhile but this has worked well for so long that I'd rather not mess with it without good reason.

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

No branches or pull requests

5 participants