couchbaselabs / ansible-couchbase-server

Apache License 2.0
11 stars 14 forks source link

Setting version to "community" doesn't really install community version #20

Open evgenyidf opened 3 years ago

evgenyidf commented 3 years ago

It keeps on trying to install the "enterprise" version.. even if you set :

couchbase_server_edition: 'community'

I tried with the 7.0.0 version

If you try to overcome this by changing the: tasks/install/redhat.yml with following:

- name: Set the Couchbase Package Version with edition type
  set_fact:
    couchbase_server_version: "community-{{ couchbase_server_version }}"
  when:
    - couchbase_server_edition == 'community'
    - (couchbase_server_download_url is defined) and (couchbase_server_download_url | length == 0)
  tags:
    - couchbase_install

 - name: Install Couchbase Server package
  yum:
    name: "couchbase-server-{{ couchbase_server_version }}"

It fails on other, non-community version actions like:

(*) I also have an issue with initial rebalancing, but this might be not related to license type...

annahowell commented 3 years ago

@evgenyidf I managed to get around this issue on Ubuntu 20.04 by using couchbase_server_download_url to specify the URL of the community edition: couchbase_server_download_url: "https://packages.couchbase.com/releases/7.0.0/couchbase-server-community_7.0.0-ubuntu20.04_amd64.deb"

joshuaclausen commented 2 years ago

Yeah, the current version only installs enterprise. I don't have time right now to make a pull request to support either community or enterprise, but below is where that change would have to happen:

It's in the tasks/install files, in the following tasks, you can change "couchbase-server" to "couchbase-server-community": "Get the Latest Couchbase Package Version" "Set the Couchbase Package Version" "Install Couchbase Server package"

For the tasks that fail with messages about enterprise being required, you can go in and remove the options in the tasks' shell parameters.

The "Set the Couchbase Audit Configuration" task needs "and couchbase_server_edition == 'enterprise'" added to the "when:" statement in the task.

The "Fail when the couchbase_security.tls_min_version is set but is invalid" task needs "and couchbase_server_edition == 'enterprise'" added to the "when:" statement in the task.