ansible-ipfs-cluster icon indicating copy to clipboard operation
ansible-ipfs-cluster copied to clipboard

Convert to ansible role

Open madoke opened this issue 3 years ago • 8 comments

Hi ! This is a great playbook and i've been using it for a while now, however i feel that it could be improved by converting it to the normal role format so that it could be imported on other playbooks and used alongside other roles. Will be glad to contribute if this makes sense to the project

madoke avatar Jun 27 '21 22:06 madoke

Makes sense in principle. Can you outline what changes that will require?

hsanjuan avatar Jun 28 '21 08:06 hsanjuan

Makes sense in principle. Can you outline what changes that will require?

ok, so accorfing to the docs (https://galaxy.ansible.com/docs/contributing/creating_role.html), we need to change the directory structure into this:

|-- README.md
|-- defaults
|   `-- main.yml
|-- files
|-- handlers
|   `-- main.yml
|-- meta
|   `-- main.yml
|-- tasks
|   `-- main.yml
|-- templates
|-- tests
|   |-- inventory
|   `-- test.yml
`-- vars
    `-- main.yml

Which would mean:

  • move all the tasks/handlers/templates under roles to the new structure (maybe ipfs + ipfs-cluster folders inside each ?)
  • move all the vars under host_vars / group_vars to role parameters/defaults
  • adapt the readme file with instructions on how to use the role
  • implement some tests (optional)

Maybe i can create a draft pull request and we can go from there ?

madoke avatar Jun 28 '21 21:06 madoke

PR #10 complete. Can you give it a try ?

madoke avatar Jul 07 '21 23:07 madoke

Any progress on this? Anything I can help with?

insanity54 avatar Sep 08 '22 05:09 insanity54

Any progress on this? Anything I can help with?

Hey, were you able to use it ? I've been using this branch occasionally and so far so good, but i'd say it could probably use some updates now. Eitherway, let me know if it works for you and if its worth to get these updates done so we can merge

madoke avatar Sep 12 '22 20:09 madoke

Yes I was, thank you! Here's what I'm using in my requirements.yml

---

roles:
  - name: madoke.ansible-ipfs-cluster
    src: https://github.com/madoke/ansible-ipfs-cluster.git
    scm: git
    type: git
    version: 3bd23433fdae86f342eeb23a5857119a87adbac9

It's working quite well and I appreciate the time savings it has afforded me. Right now I'm pulling in madoke.ansible-ipfs-cluster via git, but It would be wonderful to have ansible-ipfs-cluster on ansible-galaxy. If there's anything that needs doing to make it happen, I am happy to contribute.

insanity54 avatar Sep 12 '22 20:09 insanity54

Any updates on this? Would love to contribute!

mbwmbw1337 avatar Sep 19 '23 19:09 mbwmbw1337

Any updates on this? Would love to contribute!

It's probably outdated now and some parts may need revisiting, but it did the job. Let me know if you have trouble running it I can try to help !

madoke avatar Sep 19 '23 22:09 madoke