Skip to content

Commit

Permalink
Replaced script-module calls with shell-module calls (#1)
Browse files Browse the repository at this point in the history
* script -> shell

* script -> shell

* script -> shell

* script -> shell

* Removed .idea dir

Co-authored-by: Jan van Mansum <[email protected]>
  • Loading branch information
janvanmansum and janvanmansum authored Jul 26, 2020
1 parent a98d8eb commit 8797476
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
venv
.vagrant/
/.idea
/*.iml
6 changes: 3 additions & 3 deletions tasks/custom_sampledata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# but the above find command fails outside of vagrant(?!?)
# so let's hard-code create-users.sh for now
- name: run scripts in sampleuser dir
script: '{{ dataverse.custom_sampledata.custom_sampleusers }}/create-users.sh {{ dataverse.custom_sampledata.custom_sampleusers }}'
shell: '{{ dataverse.custom_sampledata.custom_sampleusers }}/create-users.sh {{ dataverse.custom_sampledata.custom_sampleusers }}'
args:
chdir: '{{ dataverse.custom_sampledata.custom_sampleusers }}'

Expand Down Expand Up @@ -79,7 +79,7 @@
register: sampledatasetscripts_list

- name: run sampledatasets scripts
script: '{{ item.path }} {{ api_token }} {{ dataverse.custom_sampledata.custom_sampledatasets }}'
shell: '{{ item.path }} {{ api_token }} {{ dataverse.custom_sampledata.custom_sampledatasets }}'
args:
chdir: '{{ dataverse.custom_sampledata.custom_sampledatasets }}'
with_items: '{{ sampledatasetscripts_list.files }}'
Expand All @@ -92,7 +92,7 @@
register: sampledatafilescripts_list

- name: run sampledatafile scripts
script: '{{ item.path }} {{ api_token }} {{ dataverse.custom_sampledata.custom_samplefiles }}'
shell: '{{ item.path }} {{ api_token }} {{ dataverse.custom_sampledata.custom_samplefiles }}'
args:
chdir: '{{ dataverse.custom_sampledata.custom_samplefiles }}'
with_items: '{{ sampledatafilescripts_list.files }}'
2 changes: 1 addition & 1 deletion tasks/dataverse-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
dataverse.glassfish.zipurl is not match(".*glassfish-4.1.zip")

- name: fire off installer
script: '/usr/bin/python /tmp/dvinstall/install.py -f --config_file=default.config --noninteractive > /tmp/dvinstall/install.out 2>&1'
shell: '/usr/bin/python /tmp/dvinstall/install.py -f --config_file=default.config --noninteractive > /tmp/dvinstall/install.out 2>&1'
become: yes
become_user: '{{ dataverse.glassfish.user }}'
args:
Expand Down
2 changes: 1 addition & 1 deletion tasks/dataverse-postinstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
when: dataverse.custom_metadata_blocks.enabled == True

- name: update custom metadata blocks
script: '/tmp/dvinstall/updateSchemaMDB.sh -t {{ dataverse.solr.root }}/server/solr/collection1/conf'
shell: '/tmp/dvinstall/updateSchemaMDB.sh -t {{ dataverse.solr.root }}/server/solr/collection1/conf'
become: yes
become_user: '{{ dataverse.solr.user }}'
when: dataverse.custom_metadata_blocks.enabled == True
Expand Down
13 changes: 12 additions & 1 deletion tasks/dataverse-previewers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
debug:
msg: '##### DATAVERSE PREVIEWERS #####'

- name: upload dataverse-previewers.sh script
copy:
src: dataverse-previewers.sh
dest: '{{ ansible_user_dir }}'
mode: 0700

- name: enable dataverse-previewers
script: dataverse-previewers.sh
shell: '{{ ansible_user_dir }}/dataverse-previewers.sh'
tags: previewers

- name: clean up dataverse-previewers.sh script
file:
path: '{{ ansible_user_dir }}/dataverse-previewers.sh'
state: absent

0 comments on commit 8797476

Please sign in to comment.