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/haskell/tasks/main.yml
Normal file
4
roles/haskell/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'
|
14
roles/haskell/tasks/main_lin.yml
Normal file
14
roles/haskell/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: install Haskell platform
|
||||
apt:
|
||||
name: haskell-platform
|
||||
state: latest
|
||||
|
||||
- name: install Haskell Tool Stack
|
||||
apt:
|
||||
name: haskell-stack
|
||||
state: latest
|
||||
|
||||
- name: install Haskell compiler
|
||||
apt:
|
||||
name: ghc
|
||||
state: latest
|
25
roles/haskell/tasks/main_win.yml
Normal file
25
roles/haskell/tasks/main_win.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- name: Check Haskell install status
|
||||
win_stat:
|
||||
path: C:\ghcup\bin\ghc.exe
|
||||
register: file
|
||||
|
||||
- when: not file.stat.exists
|
||||
block:
|
||||
- name: Download Haskell
|
||||
win_get_url:
|
||||
url: "https://www.haskell.org/ghcup/sh/bootstrap-haskell.ps1"
|
||||
dest: 'C:\'
|
||||
register: download
|
||||
|
||||
- name: Install Haskell
|
||||
win_command: powershell.exe {{ download.dest }} -InBash -ExistingMsys2Dir C:\msys64
|
||||
|
||||
- name: Add Haskell to PATH
|
||||
win_path:
|
||||
elements:
|
||||
C:\ghcup\bin
|
||||
|
||||
- name: Remove temporary files
|
||||
win_file:
|
||||
path: "{{ download.dest }}"
|
||||
state: absent
|
Loading…
Add table
Add a link
Reference in a new issue