Skip to content

Commit 852d71f

Browse files
authored
fixes #49 (#130)
* fixes #49
1 parent c3c66a5 commit 852d71f

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

roles/splunk/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ git_server: undefined # e.g. ssh://git@mygithost:1234 - Note that this may be se
4444
git_key: undefined # Path to SSH key for cloning repositories - Note that this may be set in an all.yml group_var or inside the git_apps dictionary within host_vars
4545
git_project: undefined
4646
git_version: master # Configure default version to clone, overridable inside the git_apps dictionary within host_vars
47+
app_relative_path: # set a sub-path you want to sync within a repo. If the repo contains multiple apps in the root directory, just set this to a trailing slash.
4748
splunk_app_deploy_path: undefined # Path under $SPLUNK_HOME/ to deploy apps to - Note that this may be set in group_vars, host_vars, playbook vars, or inside the git_apps dictionary within host_vars
4849
# IDXC Vars
4950
splunk_idxc_key: mypass4symmkey

roles/splunk/tasks/configure_apps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
loop: "{{ git_apps }}"
7979
vars:
8080
app_dest: "{{ item.splunk_app_deploy_path | default(splunk_app_deploy_path) }}"
81-
app_src: "{{ git_local_clone_path }}{{ ansible_nodename }}/{{ item.name }}"
81+
app_src: "{{ git_local_clone_path }}{{ ansible_nodename }}/{{ item.name }}{{ item.app_relative_path | default(app_relative_path) }}"
8282

8383
- name: Cleanup the local directory that was used to manage repos on the target host
8484
file:

roles/splunk/tasks/install_apps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
- name: Ensure correct permissions are set
9292
file:
93-
path: "{{ splunk_home }}/{{ app_dest }}/{{ item.name }}"
93+
path: "{{ splunk_home }}/{{ app_dest }}"
9494
owner: "{{ splunk_nix_user }}"
9595
group: "{{ splunk_nix_group }}"
9696
recurse: true

0 commit comments

Comments
 (0)