Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

repo: cassandra #2

Closed
gundalow opened this issue Feb 12, 2020 · 10 comments
Closed

repo: cassandra #2

gundalow opened this issue Feb 12, 2020 · 10 comments
Assignees

Comments

@gundalow
Copy link
Contributor

SUMMARY
Name of collection

cassandra

GitHub maintainers

@rhysmeister

@gundalow gundalow self-assigned this Feb 12, 2020
@gundalow
Copy link
Contributor Author

gundalow commented Feb 12, 2020

https://github.com/ansible-collections/cassandra/ has been created

  • @rhysmeister to add content, see Grafana for an example
  • Setup CI, I can use GitHub Actions if you'd like

@gundalow
Copy link
Contributor Author

@rhysmeister is there anything else you need help with for Cassandra?

@rhysmeister
Copy link

@gundalow Dig into fixing the integration tests if you're keen... ;-)

No, all good I think but I go have a couple of general questions...

  • Should we be using the new path syntax across the board? i.e. community.category.module
  • Ansible Module Development Guidelines said to put shared code into lib/ansible/module_utils/ Are there any coding/style recommendations like this for collections?

@gundalow
Copy link
Contributor Author

  • Should we be using the new path syntax across the board? i.e. community.category.module

Could you please expand on this a bit?

  • Ansible Module Development Guidelines said to put shared code into lib/ansible/module_utils/ Are there any coding/style recommendations like this for collections?
    At a high level, the same guidelines apply as they did in ansible/ansible. You just need to be mindful that codes moved around, ie

ansible/ansible: lib/ansible/module_utils/
Collections: plugins/module_utils/

@rhysmeister
Copy link

@gundalow If you remember the int tests for the mongodb lookup plugin weren't working. You advise using the following path community.mongodb.mongodb, i.e.

- name: "assert we complain properly if pymongo is not there"
  debug: msg="{{ lookup('community.mongodb.mongodb', mongodb_parameters ) }}"
  register: result
  ignore_errors: yes

This work but I note that I don't have to use this syntax in my module tests. i..e. I can still use the short form here, i.e.

- name: Create replicaset with members as dictionaries - mongodb_replicaset10
  mongodb_replicaset:
    login_host: localhost
    login_port: 3001
    login_database: admin
    replica_set: '{{ mongodb_replicaset10 }}'
    members:
    - host: "localhost:3001"
      priority: 1
    - host: "localhost:3002"
      priority: 1
    - host: "localhost:3003"
      priority: 0
      hidden: true
      slaveDelay: 3600

Should this be update to community.mongodb.mongodb_replicaset or can it be left as it is?

@gundalow
Copy link
Contributor Author

Ansible-test knows what collection it's being run in, which is most likely why the short form works.

@gundalow
Copy link
Contributor Author

If it's works, leave it as is.

@rhysmeister
Copy link

OK. But not for lookup plugins though? No bother, just good to know.

@gundalow
Copy link
Contributor Author

@rhysmeister I believe this is all good, so closing. If not please reopen.
Thanks as always for the great work you are doing

@rhysmeister
Copy link

Yes all good. Thanks for the help getting setup.

R

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants