Organize tasks Phase 1 #244
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The tasks folder has become a bit cluttered. This is phase 1 to organizing the tasks based on what component that task is working on. This only splits out tasks related to the OS settings. The next phases will split the splunk related tasks and variable setting tasks.
Splitting out these tasks will allow the role to be more idempotent, so we don't need to run a monolithic task like
check_splunk.ymlwhich needs just to do some checks, as well as move things out ofmain.yml.For now, I just moved all tasks related to the OS configuration to its own folder.
I moved the user creation and configuration outside of the
install_splunk.ymland into its own task under theos_commondirectory.This also splits out certain tasks into their own smaller tasks, which will allow to limit to a specific task, like fixing configuration issues. For example, if the user was not set up correctly, you cannot use the playbook to fix that part is in the
install_splunk.ymltask, which will not run if splunk is already installed. With this, you can add-e deployment_task=os_common/configure_user.yml, and only that part will run.This PR includes a fix for the DMC configuration as well.