Skip to content

Commit

Permalink
Implemented app_filter
Browse files Browse the repository at this point in the history
  • Loading branch information
my2ndhead committed Feb 9, 2016
1 parent 08f8d0e commit 7f64c0f
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions roles/apps/Splunk_TA_nix/tasks/copy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
copy: src="{{ splunk_repository.repository_root }}/apps/{{ app_name }}/{{ item.value.bundle }}"
dest="/{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Clean existing app directory
file: path="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}/{{ app_name }}"
state=absent
when: "{{ item.value.clean_install }} is defined and
{{ item.value.clean_install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Unarchive app
unarchive: src="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}"
copy=no
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Remove temporary file
file: path="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
state=absent
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
2 changes: 1 addition & 1 deletion roles/apps/Splunk_TA_nix/tasks/remove_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
state=absent
when: "{{ item.value.install }} is defined and
{{ item.value.install }} == false"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
8 changes: 4 additions & 4 deletions roles/apps/Splunk_TA_windows/tasks/copy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
copy: src="{{ splunk_repository.repository_root }}/apps/{{ app_name }}/{{ item.value.bundle }}"
dest="/{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Clean existing app directory
file: path="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}/{{ app_name }}"
state=absent
when: "{{ item.value.clean_install }} is defined and
{{ item.value.clean_install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Unarchive app
unarchive: src="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}"
copy=no
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Remove temporary file
file: path="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
state=absent
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
2 changes: 1 addition & 1 deletion roles/apps/Splunk_TA_windows/tasks/remove_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
state=absent
when: "{{ item.value.install }} is defined and
{{ item.value.install }} == false"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
8 changes: 4 additions & 4 deletions roles/apps/app.template/tasks/copy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
copy: src="{{ splunk_repository.repository_root }}/apps/{{ app_name }}/{{ item.value.bundle }}"
dest="/{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Clean existing app directory
file: path="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}/{{ app_name }}"
state=absent
when: "{{ item.value.clean_install }} is defined and
{{ item.value.clean_install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Unarchive app
unarchive: src="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}"
copy=no
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Remove temporary file
file: path="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
state=absent
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
2 changes: 1 addition & 1 deletion roles/apps/app.template/tasks/remove_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
state=absent
when: "{{ item.value.install }} is defined and
{{ item.value.install }} == false"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
8 changes: 4 additions & 4 deletions roles/apps/splunk_app_db_connect/tasks/copy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
copy: src="{{ splunk_repository.repository_root }}/apps/{{ app_name }}/{{ item.value.bundle }}"
dest="/{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Clean existing app directory
file: path="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}/{{ app_name }}"
state=absent
when: "{{ item.value.clean_install }} is defined and
{{ item.value.clean_install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Unarchive app
unarchive: src="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/{{ item.key | replace('shcluster_apps', 'shcluster/apps') | replace('_', '-') }}"
copy=no
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

- name: Remove temporary file
file: path="{{ splunk_installation.remote_app_temp_path }}/{{ item.value.bundle }}"
state=absent
when: "{{ item.value.install }} == true"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"
2 changes: 1 addition & 1 deletion roles/apps/splunk_app_db_connect/tasks/remove_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
state=absent
when: "{{ item.value.install }} is defined and
{{ item.value.install }} == false"
with_dict: "{{ vars['app_name'] | default({}) }}"
with_dict: "{{ vars['app_name'] }} | app_default"

0 comments on commit 7f64c0f

Please sign in to comment.