Izveden refactor iz taskov v role
This commit is contained in:
parent
747438dedf
commit
a35460a57b
317 changed files with 2761 additions and 50 deletions
4
roles/processing/tasks/main.yml
Normal file
4
roles/processing/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- import_tasks: main_win.yml
|
||||
when: ansible_connection == 'winrm'
|
||||
- import_tasks: main_lin.yml
|
||||
when: ansible_connection == 'ssh'
|
12
roles/processing/tasks/main_lin.yml
Normal file
12
roles/processing/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
- name: Install Processing
|
||||
block:
|
||||
- name: Create destination for Processing
|
||||
file:
|
||||
path: /opt/processing
|
||||
state: directory
|
||||
- name: Download and unpack processing
|
||||
unarchive:
|
||||
src: https://github.com/processing/processing4/releases/download/processing-1286-4.0.1/processing-4.0.1-linux-x64.tgz
|
||||
dest: /opt/processing
|
||||
remote_src: yes
|
||||
|
51
roles/processing/tasks/main_win.yml
Normal file
51
roles/processing/tasks/main_win.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
- name: Set Processing version
|
||||
set_fact:
|
||||
target_version: 4.0.1
|
||||
target_build: 1286
|
||||
|
||||
- name: Check Processing install status
|
||||
win_stat:
|
||||
path: C:\Program Files\Processing\lib\version.txt
|
||||
register: file
|
||||
|
||||
- name: Check Processing version
|
||||
slurp:
|
||||
src: C:\Program Files\Processing\lib\version.txt
|
||||
register: version
|
||||
when: file.stat.exists
|
||||
|
||||
- when: not file.stat.exists or ((version.content | b64decode) != target_version)
|
||||
block:
|
||||
- name: Make Processing directory
|
||||
win_file:
|
||||
path: C:\Program Files\Processing
|
||||
state: directory
|
||||
- name: Download Processing
|
||||
win_get_url:
|
||||
dest: 'C:\Program Files\Processing\processing.zip'
|
||||
url: https://github.com/processing/processing4/releases/download/processing-{{ target_build }}-{{ target_version }}/processing-{{ target_version }}-windows-x64.zip
|
||||
- name: Unzip Processing
|
||||
win_unzip:
|
||||
dest: 'C:\Program Files\Processing'
|
||||
src: 'C:\Program Files\Processing\processing.zip'
|
||||
- name: Install Processing
|
||||
win_copy:
|
||||
dest: C:\Program Files\Processing\
|
||||
src: 'C:\Program Files\Processing\processing-{{ target_version }}\'
|
||||
remote_src: yes
|
||||
- name: Disable telemetry
|
||||
win_lineinfile:
|
||||
path: C:\Program Files\Processing\lib\defaults.txt
|
||||
regexp: 'update.check'
|
||||
line: 'update.check = false'
|
||||
- name: Create Processing shortcut
|
||||
win_shortcut:
|
||||
src: "%ProgramFiles%\\Processing\\processing.exe"
|
||||
dest: "C:\\Users\\Public\\Desktop\\Processing.lnk"
|
||||
- name: Remove temporary files
|
||||
win_file:
|
||||
path: C:\Program Files\Processing\{{ item }}
|
||||
state: absent
|
||||
loop:
|
||||
- processing.zip
|
||||
- processing-{{ target_version }}
|
Loading…
Add table
Add a link
Reference in a new issue