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/visual2/tasks/main.yml
Normal file
4
roles/visual2/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'
|
13
roles/visual2/tasks/main_lin.yml
Normal file
13
roles/visual2/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
# TODO install PowerDesigner
|
||||
- name: Install VisUAL2
|
||||
debug:
|
||||
msg: "Install Visual2"
|
||||
- name: Create dest dir
|
||||
file:
|
||||
path: /opt/VisUAL2
|
||||
state: directory
|
||||
- name: Install AppImage
|
||||
get_url:
|
||||
url: https://github.com/scc416/Visual2/releases/download/1.7.0/VisUAL2.1.7.0.AppImage
|
||||
dest: /opt/VisUAL2/VisUAL2.1.7.0.AppImage
|
||||
mode: 'u=rwx,g=rx,o=rx'
|
32
roles/visual2/tasks/main_win.yml
Normal file
32
roles/visual2/tasks/main_win.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
- name: Set Visual2 version
|
||||
set_fact:
|
||||
target_version: "1.06.10"
|
||||
|
||||
- name: Check Visual2 install status
|
||||
win_stat:
|
||||
path: "%ProgramFiles%\\VisUAL2\\VisUAL2.exe"
|
||||
register: file
|
||||
|
||||
- when: not file.stat.exists
|
||||
block:
|
||||
- name: Download Visual2
|
||||
win_get_url:
|
||||
url: https://github.com/tomcl/V2releases/releases/download/{{ target_version }}/visual2-win32-x64.zip
|
||||
dest: 'C:\'
|
||||
register: download
|
||||
|
||||
- name: Create Visual2 directory
|
||||
win_file:
|
||||
path: "%ProgramFiles%\\VisUAL2"
|
||||
state: directory
|
||||
|
||||
- name: Install Visual2
|
||||
win_unzip:
|
||||
src: "{{ download.dest }}"
|
||||
dest: "%ProgramFiles%\\VisUAL2"
|
||||
delete_archive: yes
|
||||
|
||||
- name: Create Visual2 shortcut
|
||||
win_shortcut:
|
||||
src: "%ProgramFiles%\\Visual2\\VisUAL2.exe"
|
||||
dest: "C:\\Users\\Public\\Desktop\\VisUAL2.lnk"
|
Loading…
Add table
Add a link
Reference in a new issue