ansible-ipfs-cluster
ansible-ipfs-cluster copied to clipboard
Convert into ansible role (#9)
Fixes #9:
- Created the new directory structure and moved the files to it
- Setup default variables previously on the group_vars
- Implemented molecule test to validate role with docker image
- Adapted the readme file with instructions on how to import the role, run the tests, and configure variables
- Merged
group_vars/README.mdandhost_vars/README.mdwithREADME.md - Bump default version of
go-ipfsandipfs-clusterto latest stable
New Directory structure
|-- LICENSE
|-- README.md
|-- defaults
| `-- main.yml # merges group-vars/ipfs.yml and group-vars/ipfs-cluster.yml
|-- handlers
| `-- main.yml # merges roles/ifps/handlers/main.yml and #roles/ipfs-cluster/handlers/main.yml
|-- meta
| `-- main..yml # new file, required to share role in ansible galaxy
|-- tasks
| |-- ipfs
| | `-- main.yml # moved from roles/ipfs/tasks/main.yml
| |-- ipfs-cluster
| | `-- main.yml # moved from roles/ipfs-cluster/tasks/main.yml
| `-- main.yml
|-- templates
| |-- ipfs # moved from roles/ipfs/templates
| | |-- etc
| | | |-- init.d
| | | | `-- ipfs
| | | `-- systemd
| | | `-- system
| | | `-- ipfs.service
| | `-- home
| | `-- ipfs
| | `-- ipfs_default_config
| `-- ipfs-cluster # moved from roles/ipfs-cluster/templates
| |-- etc
| | |-- init.d
| | | `-- ipfs-cluster
| | `-- systemd
| | `-- system
| | `-- ipfs-cluster.service
| |-- identity.json
| |-- peerstore
| `-- service.json
|-- molecule # new directory for tests
| |-- default
| |-- molecule.yml
| |-- verify.yml
| `-- converge.yml
`-- vars
Looking good
Test setup done, role working properly. Still need to:
- Update README (Add instructions on how to use the role and run the tests)
- Finish the tests
@madoke thanks for the work here, I am working on testing your changes here and plan to submit some feedback.
currently running into something on Ubuntu 20.04 where the ansible-ipfs-cluster : init IPFS step fails:
fatal: [<host>]: FAILED! => {"msg": "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: invalid mode: ‘A+user:ipfs:rx:allow’\nTry 'chmod --help' for more information.\n}). For information on working around this, see https://docs.ansible.com/ansible/2.11/user_guide/become.html#becoming-an-unprivileged-user"}
i got around it by installing acl (thru apt in my case).
hey @rssnyder thanks for the efforts, i did use centos for my setup. I'll look into that over the next few days, as well as fixing the conflicts too. Cheers
In the meantime, the molecule tests stopped working in the latest docker version (4.3.0) because of a change in cgroups that affects systemd. I suggest removing them or converting to vagrant for example (which im already doing on a separate branch)