Skip to content

Commit

Permalink
Fixed vars syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
my2ndhead committed Feb 9, 2016
1 parent d93cd9f commit e10dc57
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 52 deletions.
16 changes: 8 additions & 8 deletions roles/apps/Splunk_TA_nix/tasks/configure_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
- name: Configure app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/local/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/local/*.conf

- name: Configure deployment-app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/local/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/local/*.conf

- name: Configure shcluster/apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/local/"
when: vars[app_name].shcluster_apps is defined
when: vars['app_name'].shcluster_apps is defined
with_fileglob: shcluster/apps/local/*.conf

- name: Configure master-apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/local/"
when: vars[app_name].master_apps is defined
when: vars['app_name'].master_apps is defined
with_fileglob: master-apps/local/*.conf

- name: Configure app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/metadata/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/metadata/local.meta

- name: Configure deployment-app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/metadata/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/metadata/local.meta

- name: Configure shcluster/apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/metadata/"
when: vars[app_name].shcluster_apps is defined"
when: vars['app_name'].shcluster_apps is defined"
with_fileglob: shcluster/apps/metadata/local.meta

- name: Configure master-apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/metadata/"
when: vars[app_name].master_apps is defined"
when: vars['app_name'].master_apps is defined"
with_fileglob: master-apps/metadata/local.meta

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'] | 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'] | 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'] | 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'] | 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'] | default({}) }}"
16 changes: 8 additions & 8 deletions roles/apps/Splunk_TA_windows/tasks/configure_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
- name: Configure app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/local/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/local/*.conf

- name: Configure deployment-app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/local/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/local/*.conf

- name: Configure shcluster/apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/local/"
when: vars[app_name].shcluster_apps is defined
when: vars['app_name'].shcluster_apps is defined
with_fileglob: shcluster/apps/local/*.conf

- name: Configure master-apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/local/"
when: vars[app_name].master_apps is defined
when: vars['app_name'].master_apps is defined
with_fileglob: master-apps/local/*.conf

- name: Configure app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/metadata/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/metadata/local.meta

- name: Configure deployment-app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/metadata/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/metadata/local.meta

- name: Configure shcluster/apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/metadata/"
when: vars[app_name].shcluster_apps is defined"
when: vars['app_name'].shcluster_apps is defined"
with_fileglob: shcluster/apps/metadata/local.meta

- name: Configure master-apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/metadata/"
when: vars[app_name].master_apps is defined"
when: vars['app_name'].master_apps is defined"
with_fileglob: master-apps/metadata/local.meta

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'] | 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'] | 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'] | 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'] | 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'] | default({}) }}"
16 changes: 8 additions & 8 deletions roles/apps/app.template/tasks/configure_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
- name: Configure app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/local/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/local/*.conf

- name: Configure deployment-app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/local/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/local/*.conf

- name: Configure shcluster/apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/local/"
when: vars[app_name].shcluster_apps is defined
when: vars['app_name'].shcluster_apps is defined
with_fileglob: shcluster/apps/local/*.conf

- name: Configure master-apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/local/"
when: vars[app_name].master_apps is defined
when: vars['app_name'].master_apps is defined
with_fileglob: master-apps/local/*.conf

- name: Configure app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/metadata/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/metadata/local.meta

- name: Configure deployment-app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/metadata/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/metadata/local.meta

- name: Configure shcluster/apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/metadata/"
when: vars[app_name].shcluster_apps is defined"
when: vars['app_name'].shcluster_apps is defined"
with_fileglob: shcluster/apps/metadata/local.meta

- name: Configure master-apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/metadata/"
when: vars[app_name].master_apps is defined"
when: vars['app_name'].master_apps is defined"
with_fileglob: master-apps/metadata/local.meta

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'] | 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'] | 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'] | 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'] | 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'] | default({}) }}"
16 changes: 8 additions & 8 deletions roles/apps/splunk_app_db_connect/tasks/configure_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@
- name: Configure app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/local/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/local/*.conf

- name: Configure deployment-app files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/local/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/local/*.conf

- name: Configure shcluster/apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/local/"
when: vars[app_name].shcluster_apps is defined
when: vars['app_name'].shcluster_apps is defined
with_fileglob: shcluster/apps/local/*.conf

- name: Configure master-apps files (local/*.conf)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/local/"
when: vars[app_name].master_apps is defined
when: vars['app_name'].master_apps is defined
with_fileglob: master-apps/local/*.conf

- name: Configure app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/apps/{{ app_name }}/metadata/"
when: vars[app_name].apps is defined
when: vars['app_name'].apps is defined
with_fileglob: apps/metadata/local.meta

- name: Configure deployment-app permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/deployment-apps/{{ app_name }}/metadata/"
when: vars[app_name].deployment_apps is defined
when: vars['app_name'].deployment_apps is defined
with_fileglob: deployment-apps/metadata/local.meta

- name: Configure shcluster/apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/shcluster/apps/{{ app_name }}/metadata/"
when: vars[app_name].shcluster_apps is defined"
when: vars['app_name'].shcluster_apps is defined"
with_fileglob: shcluster/apps/metadata/local.meta

- name: Configure master-apps permission file (metadata/local.meta)
copy: src="{{ item }}"
dest="{{ splunk_installation.splunk_home_path }}/etc/master-apps/{{ app_name }}/metadata/"
when: vars[app_name].master_apps is defined"
when: vars['app_name'].master_apps is defined"
with_fileglob: master-apps/metadata/local.meta

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'] | 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'] | 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'] | 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'] | 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'] | default({}) }}"

0 comments on commit e10dc57

Please sign in to comment.