splunk / splunk-ansible

Ansible playbooks for configuring and managing Splunk Enterprise and Universal Forwarder deployments
353 stars 185 forks source link

License master fails to install new license on 9.2.1 #826

Open yaroslav-nakonechnikov opened 5 months ago

yaroslav-nakonechnikov commented 5 months ago
TASK [splunk_common : Ensure license path] *************************************
ok: [localhost]
Friday 03 May 2024  10:31:43 +0000 (0:00:00.877)       0:02:33.116 ************

TASK [splunk_common : Apply license] *******************************************
fatal: [localhost]: FAILED! => {
    "changed": false,
    "cmd": [
        "/opt/splunk/bin/splunk",
        "add",
        "licenses",
        "/mnt/licenses/enterprise.lic",
        "-auth",
        "admin:EXPOSED_PASS"
    ],
    "delta": "0:00:01.534122",
    "end": "2024-05-03 10:31:45.766179",
    "rc": 22,
    "start": "2024-05-03 10:31:44.232057"
}

STDERR:

WARNING: Server Certificate Hostname Validation is disabled. Please see server.conf/[sslConfig]/cliVerifyServerName for details.
/mnt/licenses/enterprise.lic: failed to add because: stack already has this license, cannot add again

MSG:

non-zero return code
...ignoring
Friday 03 May 2024  10:31:45 +0000 (0:00:02.379)       0:02:35.495 ************
Friday 03 May 2024  10:31:45 +0000 (0:00:00.059)       0:02:35.555 ************
Friday 03 May 2024  10:31:45 +0000 (0:00:00.027)       0:02:35.583 ************
Friday 03 May 2024  10:31:45 +0000 (0:00:00.060)       0:02:35.644 ************
Friday 03 May 2024  10:31:46 +0000 (0:00:00.087)       0:02:35.732 ************

TASK [splunk_license_master : include_tasks] ***********************************
included: /opt/ansible/roles/splunk_license_master/tasks/../../splunk_common/tasks/enable_forwarding.yml for localhost
Friday 03 May 2024  10:31:46 +0000 (0:00:00.103)       0:02:35.835 ************

this is not expected error.

otherwise it should be just warning, or it should overwrite license with provided value.

i expect to overwrite it, so it will guarantee that LM has always legit license installed. And renewing process it much simpler!