splunk / ansible-role-for-splunk

Splunk@Splunk's Ansible role for installing Splunk, upgrading Splunk, and installing apps/addons on Splunk deployments (VM/bare metal)
Apache License 2.0
146 stars 102 forks source link

Stuck on configure_license.yml #185

Closed RAD-Mixen closed 1 year ago

RAD-Mixen commented 1 year ago

Trying to deploy Splunk UF in a new work environment and I'm currently getting stuck on the configure_license,yml.

So not sure what is going on, because in my previous environment that I've used this in it worked great. However my current work environment the splunk_uri_lm that I point too is erroring out I believe. I tried changing the ini_file module to community.general.ini_file and that hasn't seemed to resolve the error I get below (which was exactly the same when the module was ini_file). The only reason I tried changing the ini_file module was that seemed to resolve issues in other playbooks that had the same type off error, but this one cannot be resolved in the same manner. Any help on this would be much appreciated.

TASK [ansible-role-for-splunk : Configure license] ***** ERROR! couldn't resolve module/action 'community.general.ini_file'. This often indicates a misspelling, missing collection, or incorrect module path. The error appears to be in '/runner/requirements_roles/ansible-role-for-splunk/tasks/configure_license.yml': line 33, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be:

dtwersky commented 1 year ago

@RAD-Mixen do you have the community module installed on the host you are running ansible on?

RAD-Mixen commented 1 year ago

@dtwersky I do have the - community.general module installed onto my host that ansible is on.

dtwersky commented 1 year ago

@RAD-Mixen Did you pull the latest copy of the branch? What version of ansible are you using? What OS are you using?

RAD-Mixen commented 1 year ago

@dtwersky I did pull the latest version of the branch. I'm using version 2.14.4 of ansible core inside of AWX 2.0.0 on a AlmaLinux 9 VM.

dtwersky commented 1 year ago

@RAD-Mixen

RAD-Mixen commented 1 year ago

@dtwersky

  1. What I meant there was the last place I worked at I used a release of this repo about 7-8 months old and it was great. I only had to set the following vars in the past environment: splunk_uri_lm splunk_uri_ds splunk_package_url_uf splunk_admin_username splunk_admin_password That was all I needed to get everything to work back then. However I did notice a lot of changes in the code from then and now, but I did not see a lot of updates in the readme for deploying the UF. So I went with just declraing those same variables again.
  2. The other tasks did have some issues, as they did error a little but changing their modules from ini_file to community.general.ini_file seemed to resolve the one or two playbooks that did have issues.
  3. I have the variables listed above set in group_vars in all.yml file in my repo.
  4. I will do this if needed
  5. Honestly I guess I missed the mention of this variable....as I guess I hit my blind spot of reading documentation as I call it lol. I'm going to give this a try and report back with an update. I'm guessing since it's a forwarder I'll use that one and give it a shot.
dtwersky commented 1 year ago

@RAD-Mixen In the REDME.md, the variable is mentioned here

A UF should not need a license to operate, For a UF, the splunk_license_group variable should be set to Forwarder, which is the default on a vanilla UF install. No need to have a splunk_uri_lm.

dtwersky commented 1 year ago

Another note: If you want a instance to be a peer to the LM, you will need to set the splunk_license_group variable to Peer, only then will the splunk_uri_lm be configured.

I need to update the documentation with all this. The documentation needs a overhaul in general.

RAD-Mixen commented 1 year ago

Oh ok, that makes sense, yeah I was kind of rushing, and since I've been running in verbose mode as you suggested. I'm now seeing all of the module switching now that AWX / ansible is trying to do with the playbooks in the versions I am running. So I'm going to need to trudge through these and see if I can get this to work now. Thank you very much for all of your help!