Edit mongodb_version in defaults/main.yml or in the mongdb.yml playbook to install a specific version
- mongodb_source_key
- mongodb_source_url
- mongodb_verion
- hosts: all
gather_facts: false
become: true
roles:
- ansible-mongodb
vars:
mongodb_version: "4.0"
ansible-playbook -i hosts mongodb.yaml