Skip to content

Commit

Permalink
Move some files to live downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
sommer committed Feb 4, 2020
1 parent e9a426a commit 7f468af
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 18 deletions.
5 changes: 5 additions & 0 deletions ansible/roles/omnetpp/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
omnetpp_tarball_url: https://github.com/omnetpp/omnetpp/releases/download/omnetpp-5.5.1/omnetpp-5.5.1-src-linux.tgz
omnetpp_tarball_filename: omnetpp-5.5.1-src-linux.tgz
omnetpp_tarball_sha1: 9a20bfcb8d367844e5e8d5c781127aa794292ffa
omnetpp_dir: omnetpp-5.5.1
12 changes: 9 additions & 3 deletions ansible/roles/omnetpp/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,26 @@
with_items:
- src

- name: Download source
get_url:
url: "{{ omnetpp_tarball_url }}"
dest: "/home/veins/src/{{ omnetpp_tarball_filename }}"
checksum: "sha1:{{ omnetpp_tarball_sha1 }}"

- name: Unpack source
become_user: veins
shell: |
set -exu
tar -xf omnetpp-5.5.1-src-linux.tgz
tar -xvf "{{ omnetpp_tarball_filename }}"
args:
executable: /bin/sh
chdir: /home/veins/src
creates: /home/veins/src/omnetpp-5.5.1
creates: "/home/veins/src/{{ omnetpp_dir }}"

- name: Create symlink
become_user: veins
file:
src: /home/veins/src/omnetpp-5.5.1
src: "/home/veins/src/{{ omnetpp_dir }}"
dest: /home/veins/src/omnetpp
state: link

Expand Down
5 changes: 5 additions & 0 deletions ansible/roles/sumo/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sumo_tarball_url: https://sourceforge.net/projects/sumo/files/sumo/version%201.4.0/sumo-src-1.4.0.tar.gz/download
sumo_tarball_filename: sumo-src-1.4.0.tar.gz
sumo_tarball_sha1: 9376726b592b5c13b9cad63d80d43c67adeadafe
sumo_dir: sumo-1.4.0
12 changes: 9 additions & 3 deletions ansible/roles/sumo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,26 @@
with_items:
- src

- name: Download source
get_url:
url: "{{ sumo_tarball_url }}"
dest: "/home/veins/src/{{ sumo_tarball_filename }}"
checksum: "sha1:{{ sumo_tarball_sha1 }}"

- name: Unpack source
become_user: veins
shell: |
set -exu
tar -xvf sumo-src-1.4.0.tar.gz
tar -xvf "{{ sumo_tarball_filename }}"
args:
executable: /bin/sh
chdir: /home/veins/src
creates: /home/veins/src/sumo-1.4.0
creates: "/home/veins/src/{{ sumo_dir }}"

- name: Create symlink
become_user: veins
file:
src: /home/veins/src/sumo-1.4.0
src: "/home/veins/src/{{ sumo_dir }}"
dest: /home/veins/src/sumo
state: link

Expand Down
3 changes: 1 addition & 2 deletions files/SHA1SUMS
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
9376726b592b5c13b9cad63d80d43c67adeadafe sumo-src-1.4.0.tar.gz
9a20bfcb8d367844e5e8d5c781127aa794292ffa omnetpp-5.5.1-src-linux.tgz
da39a3ee5e6b4b0d3255bfef95601890afd80709 _empty
Empty file added files/_empty
Empty file.
10 changes: 0 additions & 10 deletions instant-veins.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@
"execute_command": "echo 'veins' | {{.Vars}} sudo -E -S bash '{{.Path}}'",
"script": "scripts/pre.sh"
},
{
"type": "file",
"source": "files/omnetpp-5.5.1-src-linux.tgz",
"destination": "/home/veins/src/omnetpp-5.5.1-src-linux.tgz"
},
{
"type": "file",
"source": "files/sumo-src-1.4.0.tar.gz",
"destination": "/home/veins/src/sumo-src-1.4.0.tar.gz"
},
{
"type": "ansible-local",
"playbook_file": "ansible/instant-veins.yml",
Expand Down

0 comments on commit 7f468af

Please sign in to comment.