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/msys2/tasks/main.yml
Normal file
4
roles/msys2/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'
|
3
roles/msys2/tasks/main_lin.yml
Normal file
3
roles/msys2/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- name: Do not install Msys2
|
||||
debug:
|
||||
msg: "Do not install Msys2"
|
41
roles/msys2/tasks/main_win.yml
Normal file
41
roles/msys2/tasks/main_win.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
- name: Check msys2 install status
|
||||
win_stat:
|
||||
path: C:\msys64
|
||||
register: file
|
||||
|
||||
- when: not file.stat.exists
|
||||
block:
|
||||
- name: Download msys2
|
||||
win_get_url:
|
||||
url: "https://github.com/msys2/msys2-installer/releases/download/2022-09-04/msys2-x86_64-20220904.exe"
|
||||
dest: 'C:\'
|
||||
register: download
|
||||
|
||||
- name: Install msys2
|
||||
win_package:
|
||||
path: "{{ download.dest }}"
|
||||
arguments: install --confirm-command --accept-messages --root C:\msys64
|
||||
|
||||
- name: Remove temporary files
|
||||
win_file:
|
||||
path: "{{ download.dest }}"
|
||||
state: absent
|
||||
|
||||
- name: Create desktop shortcut
|
||||
win_shortcut:
|
||||
src: "C:\\msys64\\msys2.exe"
|
||||
dest: "C:\\Users\\Public\\Desktop\\msys2.lnk"
|
||||
|
||||
- name: Update msys2
|
||||
win_command: C:\\msys64\\usr\\bin\\pacman -Syu --noconfirm
|
||||
|
||||
- name: Install essentials
|
||||
win_command: C:\\msys64\\usr\\bin\\pacman -S --noconfirm {{ item }}
|
||||
loop:
|
||||
- gcc
|
||||
- git
|
||||
- make
|
||||
- nano
|
||||
- rlwrap
|
||||
- rsync
|
||||
- vim
|
Loading…
Add table
Add a link
Reference in a new issue